From 80b84af58d79f2c7f58561336902fb9a45404c74 Mon Sep 17 00:00:00 2001 From: Chris Friedberg Date: Tue, 15 Oct 2024 15:10:21 -0700 Subject: [PATCH] refactor: updates SASS build tasks to search folders recursively #340 --- .gitignore | 6 +++--- package.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index dc4fd98e..276a11fd 100644 --- a/.gitignore +++ b/.gitignore @@ -8,11 +8,11 @@ demo/*.css demo/*.css.map ## CSS built from Sass process -src/*.css -src/*.css.map +src/**/*.css +src/**/*.css.map ## *-css built from sass-render process -*-css.js +**/*-css.js ## dist files dist/ diff --git a/package.json b/package.json index 94fef3e6..37a9725c 100644 --- a/package.json +++ b/package.json @@ -156,7 +156,7 @@ "build:dev:assets": "npm-run-all build:sass:component postCss:component sass:render", "build:docs": "node ./node_modules/@aurodesignsystem/auro-library/scripts/build/generateDocs.mjs", "build:sass": "npm-run-all build:sass:component postCss:component sass:render", - "build:sass:component": "for file in src/*.scss; do npx sass --no-source-map \"$file:${file%.scss}.css\"; done", + "build:sass:component": "sass --no-source-map src:src", "build:version": "node scripts/version.mjs", "build:watch": "nodemon -e scss,js --watch src --exec npm run build:dev:assets", "bundler": "rollup -c", @@ -174,9 +174,9 @@ "preCommit": "node ./node_modules/@aurodesignsystem/auro-library/scripts/build/pre-commit.mjs", "postCss:component": "node ./node_modules/@aurodesignsystem/auro-library/scripts/build/postCss.mjs", "postinstall": "node packageScripts/postinstall.mjs", - "sass:render": "sass-render src/*.css -t ./node_modules/@aurodesignsystem/auro-library/scripts/build/staticStyles-template.js", + "sass:render": "sass-render 'src/**/*.css' 'components/**/*.css' -t ./node_modules/@aurodesignsystem/auro-library/scripts/build/staticStyles-template.js", "serve": "web-dev-server --open demo/ --node-resolve --watch", - "sweep": "rm -rf ./demo/css ./dist | rm ./src/*.css ./src/*-css.js", + "sweep": "find ./demo ./dist ./src ./components -type f \\( -name \"*.css\" -o -name \"*-css.js\" \\) -delete", "test": "wtr --coverage", "test:watch": "wtr --watch", "prepare": "husky install",