From 9d29cf900a2a41cb6ea09dc1edf64f1bef036074 Mon Sep 17 00:00:00 2001 From: Romain Bioteau Date: Thu, 17 Oct 2024 10:13:25 +0200 Subject: [PATCH] chore(build): use sass dependency instead of abandonned node-sass package (#15) --- .github/workflows/workflow-build.yml | 8 +++--- .../archetype-resources/package.json | 4 +-- .../my-custom-theme/reference/package.json | 4 +-- .../my-custom-theme/reference/pom.xml | 25 +++++++++++++++++++ 4 files changed, 33 insertions(+), 8 deletions(-) diff --git a/.github/workflows/workflow-build.yml b/.github/workflows/workflow-build.yml index f9723db..56ccd6e 100644 --- a/.github/workflows/workflow-build.yml +++ b/.github/workflows/workflow-build.yml @@ -39,12 +39,12 @@ jobs: - name: Build and test archetype run: ./mvnw -B -ntp clean package - name: Upload archetype for tests - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: latest-snapshot path: target/bonita-theme-archetype-* - name: Upload archetype pom for tests - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: latest-snapshot-pom path: pom.xml @@ -62,11 +62,11 @@ jobs: java-version: 17 distribution: 'temurin' - name: Download latest archetype snapshot - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: latest-snapshot - name: Download archetype pom - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: latest-snapshot-pom - name: Display structure of downloaded files diff --git a/src/main/resources/archetype-resources/package.json b/src/main/resources/archetype-resources/package.json index cb6cd97..6d633fd 100644 --- a/src/main/resources/archetype-resources/package.json +++ b/src/main/resources/archetype-resources/package.json @@ -4,10 +4,10 @@ "description": "$description", "license": "GPL-2.0-or-later", "scripts": { - "build": "node-sass --precision 8 --output-style compressed --omit-source-map-url true --include-path ./node_modules/bootstrap-sass/assets/stylesheets/ src/scss/main.scss target/theme.noprefix.css && postcss target/theme.noprefix.css --no-map --use autoprefixer -b \"last 2 versions\" -o dist/theme.css" + "build": "sass -q --precision 8 --style compressed --no-source-map --load-path ./node_modules/bootstrap-sass/assets/stylesheets/ src/scss/main.scss target/theme.noprefix.css && postcss target/theme.noprefix.css --no-map --use autoprefixer -b \"last 2 versions\" -o dist/theme.css" }, "devDependencies": { - "node-sass": "9.0.0", + "sass": "1.80.1", "postcss-cli": "10.1.0", "postcss": "8.4.31", "autoprefixer": "10.4.16", diff --git a/src/test/resources/projects/my-custom-theme/reference/package.json b/src/test/resources/projects/my-custom-theme/reference/package.json index 89e6321..1e19703 100644 --- a/src/test/resources/projects/my-custom-theme/reference/package.json +++ b/src/test/resources/projects/my-custom-theme/reference/package.json @@ -4,10 +4,10 @@ "description": "My Custom Theme description", "license": "GPL-2.0-or-later", "scripts": { - "build": "node-sass --precision 8 --output-style compressed --omit-source-map-url true --include-path ./node_modules/bootstrap-sass/assets/stylesheets/ src/scss/main.scss target/theme.noprefix.css && postcss target/theme.noprefix.css --no-map --use autoprefixer -b \"last 2 versions\" -o dist/theme.css" + "build": "sass -q --precision 8 --style compressed --no-source-map --load-path ./node_modules/bootstrap-sass/assets/stylesheets/ src/scss/main.scss target/theme.noprefix.css && postcss target/theme.noprefix.css --no-map --use autoprefixer -b \"last 2 versions\" -o dist/theme.css" }, "devDependencies": { - "node-sass": "9.0.0", + "sass": "1.80.1", "postcss-cli": "10.1.0", "postcss": "8.4.31", "autoprefixer": "10.4.16", diff --git a/src/test/resources/projects/my-custom-theme/reference/pom.xml b/src/test/resources/projects/my-custom-theme/reference/pom.xml index e368e72..5b98e1c 100644 --- a/src/test/resources/projects/my-custom-theme/reference/pom.xml +++ b/src/test/resources/projects/my-custom-theme/reference/pom.xml @@ -10,6 +10,31 @@ My Custom Theme My Custom Theme description + + + keepNodeModules + + false + + + + + org.apache.maven.plugins + maven-clean-plugin + + + + node + false + + + + + + + + + v20.9.0 10.8.1