Skip to content

Commit

Permalink
chore: useToast 빌드 포함
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo-o committed Sep 15, 2024
1 parent aab1379 commit eadf873
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/scripts/generateBuildConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,22 @@ const excludedComponents = [
"CollectionContext",
"DropDownOptionList",
"pickerComponents",
"ToastContext",
];

// 추가할 컴포넌트 목록
const includedComponents = ["useToast"];

const getFilteredComponentFiles = async (directoryPath: string) => {
const files = await fs.readdir(directoryPath, { recursive: true });

return files.filter(
(file) =>
file.endsWith(".tsx") &&
!file.includes("test") &&
!file.includes("stories") &&
!excludedComponents.some((excluded) => file.includes(excluded))
(file.endsWith(".tsx") &&
!file.includes("test") &&
!file.includes("stories") &&
!excludedComponents.some((excluded) => file.includes(excluded))) ||
includedComponents.some((included) => file.includes(included))
);
};

Expand Down
10 changes: 10 additions & 0 deletions packages/wow-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,21 @@
"type": "module",
"exports": {
"./styles.css": "./dist/styles.css",
"./ToastProvider": {
"types": "./dist/components/Toast/ToastProvider.d.ts",
"require": "./dist/ToastProvider.cjs",
"import": "./dist/ToastProvider.js"
},
"./Toast": {
"types": "./dist/components/Toast/index.d.ts",
"require": "./dist/Toast.cjs",
"import": "./dist/Toast.js"
},
"./useToast": {
"types": "./dist/components/Toast/useToast.d.ts",
"require": "./dist/useToast.cjs",
"import": "./dist/useToast.js"
},
"./TextField": {
"types": "./dist/components/TextField/index.d.ts",
"require": "./dist/TextField.cjs",
Expand Down
2 changes: 2 additions & 0 deletions packages/wow-ui/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ process.env.BABEL_ENV = "production";

export default {
input: {
ToastProvider: "./src/components/Toast/ToastProvider",
Toast: "./src/components/Toast",
useToast: "./src/components/Toast/useToast",
TextField: "./src/components/TextField",
TextButton: "./src/components/TextButton",
Tag: "./src/components/Tag",
Expand Down

0 comments on commit eadf873

Please sign in to comment.