-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
58 lines (49 loc) · 1 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
apply plugin: 'idea'
apply plugin: 'com.moowork.node'
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.moowork.gradle:gradle-node-plugin:1.1.1"
}
}
repositories {
mavenCentral()
mavenLocal()
}
node {
version = '6.10.2'
npmVersion = '3.10.6'
download = true
workDir = file("${project.buildDir}/node")
nodeModulesDir = file("${project.projectDir}")
}
/**
* Runs "npm run build" to build the angular app.
*/
task build(type: NpmTask) {
args = ['run', 'build']
}
build.dependsOn(npm_install)
/**
* Deletes the "dist" folder containing the result of the Angular build process.
*/
task clean(type: Delete){
delete "dist"
}
/**
* Cleans everything that is created by the node plugin, i.e. the node installation and the node_modules
* folder.
*/
task cleanAll(type: Delete){
delete "build"
delete "node_modules"
delete ".gradle"
}
cleanAll.dependsOn(clean)