This repository has been archived by the owner on Apr 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gruntfile.coffee
50 lines (46 loc) · 1.58 KB
/
gruntfile.coffee
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
module.exports = (grunt) ->
grunt.loadNpmTasks("grunt-contrib-clean")
grunt.loadNpmTasks("grunt-purescript")
grunt.loadNpmTasks("grunt-execute")
grunt.initConfig
libFiles: [
"bower_components/purescript-*/src/**/*.purs"
"bower_components/purescript-*/src/**/*.purs.hs"
"src/Vue.purs"
"src/Language/JavaScript/Library/FFI.purs"
]
clean:
tests: ["tmp"]
lib: ["js", "externs"]
pscMake: ["<%=libFiles%>"]
dotPsci: ["<%=libFiles%>"]
psc:
tests:
options:
module: ["TestRunner"]
# main: true
noMagicDo: true
src: ["tests/TestRunner.purs", "<%=libFiles%>"]
dest: "tmp/tests.js"
hello_world:
options:
module: ["Main"]
main: true
src: ["examples/hello_world/Main.purs", "<%=libFiles%>"]
dest: "public/hello_world/main.js"
github_commits:
options:
module: ["Main"]
main: true
src: ["examples/github_commits/Main.purs", "<%=libFiles%>"]
dest: "public/github_commits/main.js"
execute:
tests:
src: "tmp/tests.js"
grunt.registerTask("test", ["build", "clean:tests", "psc:tests", "execute:tests", "clean:tests"])
grunt.registerTask("build", ["psc:hello_world"])
grunt.registerTask("hello_world", ["make", "psc:hello_world"])
grunt.registerTask("github_commits", ["make", "psc:github_commits"])
grunt.registerTask("make", ["pscMake", "dotPsci"])
grunt.registerTask("examples", ["hello_world", "github_commits"])
grunt.registerTask("default", ["make", "build"])