Skip to content

Commit

Permalink
chore(build): use sass dependency instead of abandonned node-sass pac…
Browse files Browse the repository at this point in the history
…kage (#15)
  • Loading branch information
rbioteau authored Oct 17, 2024
1 parent bfe7d18 commit 9d29cf9
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/workflow-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/archetype-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
25 changes: 25 additions & 0 deletions src/test/resources/projects/my-custom-theme/reference/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@
<name>My Custom Theme</name>
<description>My Custom Theme description</description>

<profiles>
<profile>
<id>keepNodeModules</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>node</directory>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<properties>
<node.version>v20.9.0</node.version>
<npm.version>10.8.1</npm.version>
Expand Down

0 comments on commit 9d29cf9

Please sign in to comment.