chore: assets package 생성

This commit is contained in:
2025-02-25 16:43:05 +09:00
parent b42042d999
commit 6d0d2654de
12 changed files with 150 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
node_modules
dist
+32
View File
@@ -0,0 +1,32 @@
{
"name": "@common/assets",
"version": "0.0.0",
"private": true,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist/**"
],
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./images": "./src/images",
"./icons": "./src/icons",
"./fonts": "./src/fonts"
},
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"clean": "rm -rf dist",
"lint": "eslint src/**/*.ts*"
},
"devDependencies": {
"typescript": "^5.3.3",
"tsup": "^8.0.1",
"@types/node": "^20.11.0"
}
}
@@ -0,0 +1,5 @@
export const fonts = {
// 예시: pretendard: require('./Pretendard-Regular.woff2'),
} as const;
export type FontType = keyof typeof fonts;
@@ -0,0 +1,5 @@
export const icons = {
// 예시: close: require('./close.svg'),
} as const;
export type IconType = keyof typeof icons;
@@ -0,0 +1,6 @@
export const images = {
logo: require("./logo.png"),
menuBtn: require("./mob_menuBtn.svg"),
} as const;
export type ImageType = keyof typeof images;
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.6.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="레이어_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
.st1{fill:none;}
.st2{fill:#999999;}
</style>
<path class="st0" d="M32.5,36.6h-15c-2.8,0-5-2.2-5-5V18.4c0-2.8,2.2-5,5-5h15c2.8,0,5,2.2,5,5v13.1C37.5,34.4,35.3,36.6,32.5,36.6z
"/>
<rect class="st1" width="50" height="50"/>
<g>
<path class="st2" d="M32.5,13.4h-15c-2.7,0-5,2.3-5,5v13.1c0,2.7,2.3,5,5,5h15c2.7,0,5-2.3,5-5V18.4C37.5,15.7,35.3,13.4,32.5,13.4
z M17.4,34.4c-1.6,0-2.8-1.2-2.8-2.8V18.4c0-1.6,1.3-2.8,2.8-2.8h4.8v18.7H17.4z M35.2,31.6c0,1.6-1.2,2.8-2.8,2.8h-8V15.6h8
c1.6,0,2.8,1.2,2.8,2.8V31.6z"/>
<path class="st2" d="M16.9,20.4H20c0.5,0,0.9-0.4,0.9-0.9s-0.4-0.9-0.9-0.9h-3.1c-0.5,0-0.9,0.4-0.9,0.9S16.4,20.4,16.9,20.4z"/>
<path class="st2" d="M20,21.8h-3.1c-0.5,0-0.9,0.4-0.9,0.9s0.4,0.9,0.9,0.9H20c0.5,0,0.9-0.4,0.9-0.9S20.5,21.8,20,21.8z"/>
<path class="st2" d="M20,25.2h-3.1c-0.5,0-0.9,0.4-0.9,0.9s0.4,0.9,0.9,0.9H20c0.5,0,0.9-0.4,0.9-0.9C20.9,25.6,20.5,25.2,20,25.2z
"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.6.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="레이어_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;}
.st1{fill:#FFFFFF;}
.st2{fill:#999999;}
</style>
<rect class="st0" width="50" height="50"/>
<g>
<path class="st1" d="M32.5,36.5h-15c-2.8,0-5-2.2-5-5v-13c0-2.8,2.2-5,5-5h15c2.8,0,5,2.2,5,5v13C37.5,34.3,35.3,36.5,32.5,36.5z"
/>
<path class="st2" d="M32.3,13.5H19.5h-1.8c-2.9,0-5.2,2.3-5.2,5.2v12.6c0,2.9,2.3,5.2,5.2,5.2h1.8h12.8c2.9,0,5.2-2.3,5.2-5.2V18.7
C37.5,15.8,35.2,13.5,32.3,13.5z M35.4,31.5c0,1.8-1.4,3.2-3.1,3.2H20.5c-0.6,0-1-0.4-1-1v-7.6h4l-1.8,1.8
c-0.2,0.2-0.2,0.5-0.2,0.7c0,0.2,0,0.3,0.2,0.5c0.2,0.2,0.3,0.3,0.7,0.3c0.3,0,0.5,0,0.7-0.2l3.2-3.2c0.2-0.2,0.2-0.3,0.2-0.5
s0-0.3-0.2-0.5l-3.2-3.2c-0.3-0.3-0.8-0.3-1.2-0.2c-0.2,0.2-0.3,0.3-0.3,0.7c0,0.4,0,0.5,0.2,0.7l1.8,1.8h-4.2v-8.3
c0-0.6,0.4-1,1-1h11.8c1.8,0,3.2,1.5,3.2,3.2V31.5z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

+3
View File
@@ -0,0 +1,3 @@
export * from "./images";
export * from "./icons";
export * from "./fonts";
+11
View File
@@ -0,0 +1,11 @@
{
"include": ["."],
"exclude": ["dist", "build", "node_modules"],
"compilerOptions": {
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"@common/assets/*": ["./src/*"]
}
}
}
+22
View File
@@ -0,0 +1,22 @@
import { defineConfig } from "tsup";
export default defineConfig({
entry: ["src/index.ts"],
format: ["cjs", "esm"],
dts: true,
clean: true,
external: ["react"],
injectStyle: false,
loader: {
".png": "dataurl",
".jpg": "dataurl",
".jpeg": "dataurl",
".gif": "dataurl",
".svg": "dataurl",
".webp": "dataurl",
".woff": "dataurl",
".woff2": "dataurl",
".ttf": "dataurl",
".otf": "dataurl",
},
});
+22
View File
@@ -56,6 +56,18 @@ importers:
specifier: ^5
version: 5.6.3
packages/common/assets:
devDependencies:
'@types/node':
specifier: ^20.11.0
version: 20.17.19
tsup:
specifier: ^8.0.1
version: 8.3.6(postcss@8.5.3)(typescript@5.6.3)
typescript:
specifier: ^5.3.3
version: 5.6.3
packages/common/components:
dependencies:
'@radix-ui/react-accordion':
@@ -2680,6 +2692,12 @@ packages:
resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==}
dev: true
/@types/node@20.17.19:
resolution: {integrity: sha512-LEwC7o1ifqg/6r2gn9Dns0f1rhK+fPFDoMiceTJ6kWmVk6bgXBI/9IOWfVan4WiAavK9pIVWdX0/e3J+eEUh5A==}
dependencies:
undici-types: 6.19.8
dev: true
/@types/node@22.13.4:
resolution: {integrity: sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==}
dependencies:
@@ -6238,6 +6256,10 @@ packages:
which-boxed-primitive: 1.1.1
dev: true
/undici-types@6.19.8:
resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
dev: true
/undici-types@6.20.0:
resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==}
dev: true