-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
60 lines (53 loc) · 1.39 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
51
52
53
54
55
56
57
58
59
60
module.exports = (grunt) ->
path = require('path')
# Project configuration.
grunt.initConfig
coffee:
resimg:
files:
'dist/ResImg.js': 'src/ResImg.coffee'
jshint:
resimg:
files:
src: ['dist/ResImg.js']
# options:
# 'curly': true
# 'immed': true
# 'latedef': true
# 'newcap': true
# 'noarg': true
# 'undef': true
# 'boss': true
# 'eqnull': true
# 'node': true
# 'es5': true
# 'trailing': true
# 'smarttabs': true
uglify:
# options:
# compress: false
# beautify: true
resimg:
files:
'dist/ResImg.min.js': 'dist/ResImg.js'
copy:
resimg:
expand: true
cwd: 'dist/'
src: 'ResImg.min.js'
dest: 'demo/js/'
flatten: true
# Define all the task for 'watch'
watch:
coffee:
files: 'src/*.coffee'
tasks: ['compile']
# These plugins provide necessary tasks.
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-watch'
# Default task.
#grunt.registerTask 'compile', ['coffee', 'jshint', 'uglify', 'copy']
grunt.registerTask 'compile', ['coffee', 'uglify', 'copy']