-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] Icon 컴포넌트 추가 #48
Changes from all commits
163e943
24cce89
6f4c12d
95c2db2
23ed120
762a8e7
fb3b6b3
e5ef74c
df39275
5723efc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { createVanillaExtractPlugin } from '@vanilla-extract/next-plugin'; | ||
const withVanillaExtract = createVanillaExtractPlugin(); | ||
|
||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {}; | ||
const nextConfig = { | ||
transpilePackages: ['@repo/ui', '@repo/theme'], | ||
}; | ||
|
||
export default withVanillaExtract(nextConfig); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import { Icon } from '@repo/ui'; | ||
|
||
export default function Home() { | ||
return <div>웹 1팀 파이팅!</div>; | ||
return ( | ||
<div> | ||
웹 1팀 파이팅! | ||
<Icon width={100} height={100} name="stack" fill="blue" /> | ||
</div> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,26 @@ | ||
export const colors = { | ||
primary: { | ||
green100: '#F1FFB5', | ||
green200: '#E6FF79', | ||
green300: '#D0F141', | ||
green400: '#D2F634', | ||
}, | ||
semantic: { | ||
warning300: '#FF724E', | ||
warning500: '#FF3300', | ||
blue: '#1662E3', | ||
}, | ||
grey: { | ||
0: '#FFFFFF', | ||
25: '#F7F9FB', | ||
50: '#EAEFF4', | ||
'50B': '#E5EEF7', | ||
100: '#D8E3ED', | ||
200: '#C2CDDE', | ||
300: '#A3ADBD', | ||
400: '#788391', | ||
500: '#5A6471', | ||
600: '#3F4750', | ||
700: '#293342', | ||
800: '#1D222C', | ||
900: '#14181F', | ||
950: '#0E0F15', | ||
1000: '#000000', | ||
}, | ||
green100: '#F1FFB5', | ||
green200: '#E6FF79', | ||
green300: '#D0F141', | ||
green400: '#D2F634', | ||
|
||
kongnayeon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
warning300: '#FF724E', | ||
warning500: '#FF3300', | ||
blue: '#1662E3', | ||
|
||
grey0: '#FFFFFF', | ||
grey25: '#F7F9FB', | ||
grey50: '#EAEFF4', | ||
grey50B: '#E5EEF7', | ||
grey100: '#D8E3ED', | ||
grey200: '#C2CDDE', | ||
grey300: '#A3ADBD', | ||
grey400: '#788391', | ||
grey500: '#5A6471', | ||
grey600: '#3F4750', | ||
grey700: '#293342', | ||
grey800: '#1D222C', | ||
grey900: '#14181F', | ||
grey950: '#0E0F15', | ||
grey1000: '#000000', | ||
} as const; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,40 @@ | ||
import { vanillaExtractPlugin } from '@vanilla-extract/esbuild-plugin'; | ||
import esbuild from 'esbuild'; | ||
import { vanillaExtractPlugin } from '@vanilla-extract/esbuild-plugin'; | ||
import svgr from 'esbuild-plugin-svgr'; | ||
import { preserveDirectivesPlugin } from 'esbuild-plugin-preserve-directives'; | ||
import path from 'path'; | ||
|
||
const outdir = path.join(process.cwd(), 'dist'); | ||
|
||
const buildOptions = { | ||
entryPoints: ['src/index.ts'], | ||
bundle: true, | ||
platform: 'node', | ||
plugins: [ | ||
svgr(), | ||
vanillaExtractPlugin(), | ||
preserveDirectivesPlugin({ | ||
directives: ['use client', 'use strict'], | ||
include: /\.(js|ts|jsx|tsx)$/, | ||
exclude: /node_modules/, | ||
}), | ||
], | ||
loader: { '.css': 'file' }, | ||
outdir, | ||
external: ['react'], | ||
}; | ||
|
||
esbuild | ||
.build({ | ||
entryPoints: ['./src/index.ts'], | ||
bundle: true, | ||
plugins: [ | ||
vanillaExtractPlugin(), | ||
preserveDirectivesPlugin({ | ||
directives: ['use client', 'use strict'], | ||
include: /\.(js|ts|jsx|tsx)$/, | ||
exclude: /node_modules/, | ||
}), | ||
], | ||
...buildOptions, | ||
format: 'esm', | ||
loader: { '.css': 'file' }, | ||
outdir, | ||
external: ['react', 'react-dom'], | ||
}) | ||
.catch(() => process.exit(1)); | ||
|
||
// TODO commonjs에서 빌드 오류 나는 현상 | ||
// esbuild | ||
// .build({ | ||
// ...buildOptions, | ||
// format: 'cjs', | ||
// }) | ||
// .catch(() => process.exit(1)); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare module '*.svg' { | ||
const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>; | ||
export default content; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ | |
"name": "@repo/ui", | ||
"version": "0.0.0", | ||
"private": true, | ||
"type": "module", | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
|
@@ -12,7 +15,9 @@ | |
"scripts": { | ||
"build": "tsc && node esbuild.config.mjs", | ||
"dev": "esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/index.mjs --watch", | ||
"lint": "eslint . --max-warnings 0" | ||
"lint": "eslint . --max-warnings 0", | ||
"build:icons": "esbuild src/scripts/generate-icon-map.ts --bundle --platform=node --outdir=dist/scripts", | ||
"generate:icons": "pnpm run build:icons && node dist/scripts/generate-icon-map.js" | ||
}, | ||
"dependencies": { | ||
"@repo/theme": "workspace:^", | ||
|
@@ -21,12 +26,17 @@ | |
"react": "^18" | ||
}, | ||
"devDependencies": { | ||
"@repo/theme": "workspace:*", | ||
"@types/node": "^20.11.24", | ||
"@types/react": "^18.2.0", | ||
"@vanilla-extract/esbuild-plugin": "^2.3.5", | ||
"esbuild": "^0.21.0", | ||
"esbuild-plugin-preserve-directives": "^0.0.11" | ||
"esbuild-plugin-preserve-directives": "^0.0.11", | ||
"esbuild-plugin-svgr": "^3.1.0", | ||
"ts-node": "^10.9.2" | ||
Comment on lines
+29
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification
🔗 Analysis chain의존성 버전 충돌 가능성을 확인해주세요.
또한, 다음 스크립트로 의존성 충돌 여부를 확인해보세요: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for dependency conflicts and compatibility issues
# Check for duplicate dependencies
jq -r '.dependencies + .devDependencies | keys[]' package.json | sort | uniq -d
# Check esbuild compatibility with plugins
jq -r '.devDependencies | with_entries(select(.key | startswith("esbuild")))' package.json
Length of output: 177 Script: #!/bin/bash
# Find the ui package.json and show its contents
fd --type f "package.json" packages/ui/ --exec cat {}
Length of output: 1298 |
||
}, | ||
"peerDependencies": { | ||
"react": "^18.2.0" | ||
"react": "^18", | ||
"react-dom": "^18" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
색상 전환 토큰의 네이밍 컨벤션 및 구조 개선 필요
현재 색상 전환을 나타내는 토큰들의 네이밍이 직관적이지 않고, 실제 구현된 값은 단일 색상을 참조하고 있습니다.
다음 사항들을 개선해주세요:
예시: