-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
80 lines (70 loc) · 2.03 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
jshint:
files: ['src/**/*.js']
options:
globals:
jQuery: true
coffeelint:
app: ['src/**/*.coffee', 'Gruntfile.coffee']
watch:
files: ['<%= jshint.files %>', '<%= coffeelint.app %>']
tasks: ['jshint', 'coffeelint']
# build tasks
symlink:
options:
overwrite: true
explicit:
src: "package.json"
dest: "build/package.json"
expanded:
files: [
{
expand: true
overwrite: true
cwd: 'data'
src: ['panel.html', 'copy.png']
dest: 'build/data'
},
]
coffee:
compile:
files:
'build/index.js': 'src/index.coffee'
'build/data/input-get.js': 'src/data/input-get.coffee'
'build/data/panel-script.js': 'src/data/panel-script.coffee'
'build/data/crypto.js': 'src/data/crypto.coffee'
less:
development:
files:
'build/data/panel.css': 'data/panel.less'
min:
dist0:
src: ['build/index.js']
dest: 'build/index.js'
dist1:
src: ['build/data/input-get.js']
dest: 'build/data/input-get.js'
dist2:
src: ['build/data/panel-script.js']
dest: 'build/data/panel-script.js'
dist3:
src: ['build/data/crypto.js']
dest: 'build/data/crypto.js'
cssmin:
dist:
src: ['build/data/panel.css']
dest: 'build/data/panel.css'
# Load the plugin that provides the "jshint" task.
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-contrib-symlink'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-less'
grunt.loadNpmTasks 'grunt-yui-compressor'
# Default task(s).
grunt.registerTask 'default', [ 'symlink', 'coffee', 'less' ]
grunt.registerTask 'minall', [ 'min', 'cssmin' ]
return