Skip to content

Commit

Permalink
Build Tool Npm to Yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
seungh0 committed Jul 31, 2024
1 parent ae865b9 commit 6c60638
Show file tree
Hide file tree
Showing 3 changed files with 11,040 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ jobs:
- name: Install and Build
run: |
npm install
npm run build
yarn install
yarn run build
working-directory: cassdio-web/src/main/webapp
13 changes: 8 additions & 5 deletions cassdio-web/frontend.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,32 @@ if (frontend.toBoolean()) {

node {
version = '20.15.1'
npmVersion = '9.8.0'
yarnVersion = '1.22.22'
download = true

nodeProjectDir.set(projectDir)
}

task npmInstall2(type: NpmTask) {
tasks.register('yarnInstall2', YarnTask) {
args = ['install']
}

task npmBuild(type: NpmTask, dependsOn: npmInstall2) {
tasks.register('yarnBuild', YarnTask) {
dependsOn yarnInstall2
args = ['run', 'build']
}

task copyDist(type: Copy, dependsOn: npmBuild) {
tasks.register('copyDist', Copy) {
dependsOn yarnBuild
from("${projectDir}/build") {
include '**/*'
}
into "${project.rootDir}/cassdio-web/src/main/resources/static"
includeEmptyDirs = true
}

task deleteDist(type: Delete, dependsOn: copyDist) {
tasks.register('deleteDist', Delete) {
dependsOn copyDist
delete "${projectDir}/build"
}

Expand Down
Loading

0 comments on commit 6c60638

Please sign in to comment.