Skip to content

Commit

Permalink
use_pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
zackyoungh committed Jan 16, 2025
1 parent f0d73bb commit 6c0ad2c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- uses: actions/setup-node@v3
if: steps.filter.outputs.frontend == 'true'
with:
node-version: 16
node-version: 18
- name: Get npm cache directory
id: npm-cache-dir
if: steps.filter.outputs.frontend == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- 'dinky-web/**'
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- name: Get npm cache directory
id: npm-cache-dir
run: |
Expand Down
33 changes: 21 additions & 12 deletions dinky-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.12.0</version>
<version>1.15.1</version>
<configuration>
<nodeVersion>v18.15.0</nodeVersion>
<npmVersion>10.5.0</npmVersion>
Expand All @@ -61,24 +61,33 @@
</goals>
</execution>
<execution>
<id>npm install</id>
<id>install pnpm</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<!-- For domestic npm source acceleration, you can check the profile of npm Huawei or npm Taobao -->
<arguments>install --force --registry ${npm-registry-repo}</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
<arguments>install -g pnpm --registry ${npm-registry-repo}</arguments>
</configuration>
</execution>
<execution>
<id>install</id>
<goals>
<goal>corepack</goal>
</goals>
<configuration>
<arguments>pnpm install --registry ${npm-registry-repo}</arguments>
</configuration>
</execution>
<execution>
<id>build</id>
<goals>
<goal>corepack</goal>
</goals>
<configuration>
<arguments>pnpm build</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down

0 comments on commit 6c0ad2c

Please sign in to comment.