-
Notifications
You must be signed in to change notification settings - Fork 39
/
devloop.js
47 lines (40 loc) · 1.07 KB
/
devloop.js
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
let sbt = startSbt({
sh: "sbt -DdevMode=true",
watch: ["build.sbt"]
});
let compile = sbt.run({
command: "compile",
watch: ["**/*.scala"]
});
let generateClasspath = sbt.run({
name: "classpaths",
command: "writeClasspath"
});
let database = runServer({
name: "mysqld",
httpPort: 3388,
sh: "java -cp `cat /tmp/classpath_com.criteo.cuttle.localdb` com.criteo.cuttle.localdb.LocalDB"
}).dependsOn(generateClasspath);
let yarn = run({
sh: "yarn install",
watch: "package.json"
});
let front = webpack({
watch: [
"webpack.config.js",
"timeseries/src/main/javascript/**/*.*",
"timeseries/src/main/html/**/*.*",
"timeseries/src/main/style/**/*.*"
]
}).dependsOn(yarn, compile);
let server = runServer({
httpPort: 8888,
sh: "java -cp `cat /tmp/classpath_com.criteo.cuttle.examples` com.criteo.cuttle.examples.HelloTimeSeries",
env: {
MYSQL_LOCATIONS: "localhost:3388",
MYSQL_DATABASE: "cuttle_dev",
MYSQL_USERNAME: "root",
MYSQL_PASSWORD: ""
}
}).dependsOn(compile, generateClasspath, database);
proxy(server, 8080).dependsOn(front);