> For the complete documentation index, see [llms.txt](https://doongu.gitbook.io/pkscl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doongu.gitbook.io/pkscl/project-development/undefined.md).

# 배포과정

![](/files/vidnG4UmVy5fwz38Eogp)

![](/files/88zMT23xk7pv2cWcMaT3)

```java
def frontendDir = "$projectDir/frontend"

sourceSets {
   main {
      resources {
         srcDirs = ["$projectDir/src/main/resources"]
      }
   }
}
processResources {
   dependsOn "copyReactBuildFiles"
}
task installReact(type: Exec) {
   workingDir "$frontendDir"
   inputs.dir "$frontendDir"
   group = BasePlugin.BUILD_GROUP
   if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')){
      commandLine "npm.cmd", "audit", "fix"
      commandLine 'npm.cmd', 'install'
   } else {
      commandLine "npm", "audit", "fix" commandLine 'npm', 'install' }
}
task buildReact(type: Exec) {
   dependsOn "installReact"
   workingDir "$frontendDir"
   inputs.dir "$frontendDir"
   group = BasePlugin.BUILD_GROUP
   if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
      commandLine "npm.cmd", "run-script", "build"
   }
   else {
      commandLine "npm", "run-script", "build"
   }
}
task copyReactBuildFiles(type: Copy) {
   dependsOn "buildReact"
   from "$frontendDir/build"
   into "$projectDir/src/main/resources/static"
}
```

![](/files/cewJYm3xmNXyGFvFGwoH)

![](/files/9LhwLLOSgYWyTQPh979n)

![](/files/9c6FRxTWUAkFY3cwGKiN)
