forked from impguard/tron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
43 lines (41 loc) · 1.23 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
module.exports = (grunt) ->
grunt.initConfig(
pkg: grunt.file.readJSON("package.json")
clean:
typescript: ["js/*"]
less: ["css/*"]
typescript:
build:
src: "ts/**/*.ts"
dest: "js/tron.js"
options:
basePath: "ts"
less:
build:
src: "less/*.less"
dest: "css/style.css"
options:
sourceMapBasepath: "less"
copy:
build:
expand: true
cwd: "html/"
src: "*.html"
dest: "./"
flatten: true
filter: 'isFile'
watch:
build: {
files: ["ts/**/*.ts", "less/**/*.less"]
tasks: "default"
}
)
# Load plugins
grunt.loadNpmTasks("grunt-contrib-clean")
grunt.loadNpmTasks("grunt-contrib-copy")
grunt.loadNpmTasks("grunt-typescript")
grunt.loadNpmTasks('grunt-contrib-less')
grunt.loadNpmTasks('grunt-contrib-watch')
# Tasks
grunt.registerTask("default", ["clean", "typescript", "less", "copy"])
grunt.registerTask("css", ["clean:less", "less"])