Created
April 9, 2017 13:25
-
-
Save tigawa/c8d9b4ef639522d5316d43573d048d41 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
ext { | |
springBootVersion = '1.5.2.RELEASE' | |
} | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") | |
} | |
} | |
/* ここ追加 */ | |
plugins { | |
id "com.moowork.node" version "0.13" | |
} | |
/* ここ追加 */ | |
node { | |
workDir = file("${project.projectDir}/src/main/frontend") //package.jsonがあるディレクトリの位置を指定 | |
nodeModulesDir = file("${project.projectDir}/src/main/frontend") //node_modulesがあるディレクトリの位置を指定 | |
} | |
apply plugin: 'java' | |
apply plugin: 'eclipse' | |
apply plugin: 'org.springframework.boot' | |
version = '0.0.1-SNAPSHOT' | |
sourceCompatibility = 1.8 | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile('org.springframework.boot:spring-boot-starter-thymeleaf') | |
compile('org.springframework.boot:spring-boot-starter-web') | |
runtime('org.postgresql:postgresql') | |
compileOnly('org.projectlombok:lombok') | |
testCompile('org.springframework.boot:spring-boot-starter-test') | |
} | |
/* ここ追加 */ | |
task jsBuild(type: NpmTask) { | |
args = ['run', 'build']; //package.jsonで定義するタスクを記述する | |
} | |
/* ここ追加 */ | |
task copyStaic(type: Copy) { | |
from 'src/main/frontend/build' | |
into 'build/resources/main/static' | |
} | |
/* ここ追加 */ | |
classes.dependsOn copyStaic | |
copyStaic.dependsOn jsBuild |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/* ここ追加 */
を追加して、gradle-node-plugin を追加した。