Skip to content

The Open Standard for Generative UI

remove cp-css

abhishekddaed74ab5a2
diff --git a/frontend-sdk/packages/react-ui/cp-css.js b/frontend-sdk/packages/react-ui/cp-css.js
deleted file mode 100644
index 501444313..000000000
--- a/frontend-sdk/packages/react-ui/cp-css.js
+++ /dev/null
@@ -1,48 +0,0 @@
-const fs = require('fs');
-const path = require('path');
-
-// Create directories if they don't exist
-function ensureDirectoryExists(dirPath) {
- if (!fs.existsSync(dirPath)) {
- fs.mkdirSync(dirPath, { recursive: true });
- }
-}
-
-// Copy CSS files from src to dist
-function copyCssFiles() {
- const srcDir = path.join(__dirname, 'src', 'components');
- const distDir = path.join(__dirname, 'dist', 'styles');
-
- // Ensure the dist/styles directory exists
- ensureDirectoryExists(distDir);
-
- // Read all component directories
- const components = fs.readdirSync(srcDir);
-
- components.forEach(component => {
- const componentSrcPath = path.join(srcDir, component);
-
- // Skip if not a directory
- if (!fs.statSync(componentSrcPath).isDirectory()) {
- return;
- }
-
- // Look specifically for style.css
- const stylePath = path.join(componentSrcPath, 'style.css');
-
- if (fs.existsSync(stylePath)) {
- // Copy style.css to dist/styles/<component>.css
- const distFile = path.join(distDir, `${component}.css`);
- fs.copyFileSync(stylePath, distFile);
- console.log(`Copied ${stylePath} to ${distFile}`);
- }
- });
-}
-
-try {
- copyCssFiles();
- console.log('CSS files copied successfully!');
-} catch (error) {
- console.error('Error copying CSS files:', error);
- process.exit(1);
-}
diff --git a/frontend-sdk/packages/react-ui/package.json b/frontend-sdk/packages/react-ui/package.json
index e309a85c0..b7c84f6b0 100644
--- a/frontend-sdk/packages/react-ui/package.json
+++ b/frontend-sdk/packages/react-ui/package.json
@@ -18,11 +18,10 @@
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
- "build": "pnpm run build:tsc && pnpm run build:scss && pnpm run copy-css",
+ "build": "pnpm run build:tsc && pnpm run build:scss",
"build:tsc": "tsc -p .",
"build:scss": "sass src:dist --style compressed --no-source-map",
"storybook": "storybook dev -p 6006",
- "copy-css": "node cp-css.js",
"watch": "concurrently \"pnpm run build:ts -- --watch\" \"pnpm run build:scss -- --watch\"",
"lint:check": "eslint ./src",
"lint:fix": "eslint ./src --fix",