-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
executable file
·48 lines (40 loc) · 1.2 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
path = require "path"
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON "package.json"
uglify:
options:
banner: '/*! <%= pkg.name %> v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> */\n'
report: 'min'
# preserveComments: (node, comment) ->
# comment.type is "comment2" and comment.value.indexOf("license") isnt -1
concat:
client:
options:
separator: ";"
stripBanners:
line: true
block: false
# process: true
files:
"build/salad.js": [
"lib/{shared, client}/**/*.js"
]
coffee:
client:
options:
sourceMap: false
files: [
expand: true
src: ["src/**/*.coffee"]
dest: "lib"
rename: (folder, name) ->
name = name.replace(/(src)\//, "")
[folder, name].join path.sep
ext: ".js"
]
grunt.loadNpmTasks "grunt-contrib-uglify"
grunt.loadNpmTasks "grunt-contrib-coffee"
grunt.loadNpmTasks "grunt-contrib-concat"
grunt.registerTask "compile", ["coffee", "concat"]
grunt.registerTask "default", ["compile"]