From 74d0b8308201d38983e0556a49006fb935258824 Mon Sep 17 00:00:00 2001 From: Alexander Lobyntsev Date: Mon, 23 Dec 2024 19:44:31 +0700 Subject: [PATCH] feat: wip 1 --- packages/plasma-icons/package.json | 10 ++++++---- packages/plasma-icons/rollup.config.mjs | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/plasma-icons/package.json b/packages/plasma-icons/package.json index a179f89d66..1055ec5bbb 100644 --- a/packages/plasma-icons/package.json +++ b/packages/plasma-icons/package.json @@ -53,10 +53,9 @@ "access": "public" }, "scripts": { - "build:css": "npm run replace:linaria && BABEL_ENV=esm SC_NAMESPACE=plasma rollup -c", "prepare": "npm run build", - "prebuild": "rm -rf ./es ./Icon* ./index.* ./old ./scalable ./scripts-build ./src-build ./android-icons ./src-rn-build && cp -r ./src ./src-build && cp -r ./src/scalable ./src-rn-build", - "build": "npm run generate:react && npm run build:cjs && npm run build:esm && build:css", + "prebuild": "rm -rf ./css/es ./css/cjs ./es ./Icon* ./index.* ./old ./scalable ./scripts-build ./src-build ./android-icons ./src-rn-build && cp -r ./src ./src-build && cp -r ./src/scalable ./src-rn-build", + "build": "npm run generate:react && npm run build:cjs && npm run build:esm && npm run build:css", "postbuild": "tsc --outDir . --emitDeclarationOnly", "generate:android": "npm run build:scripts && node ./scripts-build/generateAndroidArchive.js && zip -r ./archives/android-icons.zip android-icons", "generate:react": "npm run build:scripts && node ./scripts-build/generateReactComponents.js", @@ -65,6 +64,7 @@ "build:scripts": "BABEL_ENV=cjs SC_NAMESPACE=plasma babel ./scripts --out-dir ./scripts-build --extensions .ts,.tsx", "build:cjs": "BABEL_ENV=cjs SC_NAMESPACE=plasma babel ./src-build --out-dir . --extensions .ts,.tsx", "build:esm": "BABEL_ENV=esm SC_NAMESPACE=plasma babel ./src-build --out-dir ./es --extensions .ts,.tsx", + "build:css": "npm run replace:linaria && BABEL_ENV=esm SC_NAMESPACE=plasma rollup -c", "lint": "../../node_modules/.bin/eslint ./src --ext .js,.ts,.tsx --quiet", "replace:linaria": "./scripts/replace_sc_to_linaria.sh" }, @@ -85,5 +85,7 @@ "contributors": [ "salute.developers@gmail.com" ], - "sideEffects": false + "sideEffects": [ + "*.css" + ] } diff --git a/packages/plasma-icons/rollup.config.mjs b/packages/plasma-icons/rollup.config.mjs index 53453018b9..499696f6e9 100644 --- a/packages/plasma-icons/rollup.config.mjs +++ b/packages/plasma-icons/rollup.config.mjs @@ -14,6 +14,7 @@ export default { output: [ { preserveModules: true, + preserveModulesRoot: inputDir, dir: 'css/es', format: 'es', freeze: false, @@ -23,6 +24,7 @@ export default { assetFileNames: '[name][extname]', }, { preserveModules: true, + preserveModulesRoot: inputDir, dir: 'css/cjs', format: 'cjs', freeze: false,