-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.coffee
46 lines (39 loc) · 1 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
clean:
js: ['public/js/**/*.js']
coffee:
dist:
files: [{
expand: true
cwd: 'public/javascripts'
src: ['**/*.coffee']
dest: 'public/js/build'
ext: '.js'
}]
browserify:
options:
transform: ['babelify']
dist:
src: 'public/js/build/**/*.js'
dest: 'public/js/compiled.js'
watch:
scripts:
files: ['public/**/*.coffee']
tasks: ['coffee', 'browserify']
grunt.loadNpmTasks 'grunt-browserify'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.registerTask 'default', "Generate static sites and assets", [
'clean',
'coffee',
'browserify'
]
grunt.registerTask 'build', ['default']
grunt.registerTask 'serve', [
'default',
'watch'
]
grunt.registerTask 's', ['serve']