generated from allen-cell-animated/base-react-redux-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
54 lines (46 loc) · 1.37 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
plugins {
id "com.palantir.docker-run" version "0.13.0"
id "com.moowork.node" version "1.2.0"
id "com.dorongold.task-tree" version "1.3"
}
ext {
env = System.getenv("DEPLOYMENT_ENV") ? System.getenv("DEPLOYMENT_ENV") : "dev"
npmBin = "${projectDir}/node_modules/.bin"
port = System.getenv("PORT") ? System.getenv("PORT") : 9002
}
node {
download = true
nodeModulesDir = file("${projectDir}")
npmVersion = "5.5.1"
version = "8.7.0"
}
task wrapper(type: Wrapper) {
gradleVersion '4.0.1'
distributionType 'all'
}
task bundle(type: Exec) {
executable "${npmBin}/webpack"
args = ["--config", "./webpack/webpack.config.js", "--env.env", env]
}
dockerRun {
name "visual-cell-web"
image "nginx"
volumes ".": "/usr/share/nginx/html/"
clean true
ports "${port}:80"
}
task lint(type: Exec) {
executable "${npmBin}/tslint"
FileTree tsFiles = fileTree(dir: "src", includes: ["**/*.ts", "**/*.tsx"])
args = ["-c", "tslint.json"] + tsFiles.asList()
}
task start(type: Exec) {
executable "${npmBin}/webpack-dev-server"
args = ["--config", "./webpack/webpack.config.js"]
}
task test(type: Exec) {
environment "TS_NODE_PROJECT", "tsconfig.commonjs.json"
executable "${npmBin}/mocha"
FileTree testFiles = fileTree(dir: "src", include: "**/*test*")
args = ["--opts", "mocha.opts"] + testFiles.asList()
}