-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
64 lines (54 loc) · 1.25 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
module.exports = (grunt) ->
# Load all grunt tasks
require('load-grunt-tasks')(grunt)
# Task configuration
grunt.initConfig(
clean:
before:
src: ['dist', 'tmp']
after:
src: ['dist', 'tmp']
coffee:
main:
options:
sourceRoot: ''
sourceMap: false
cwd: 'src/'
src: '**/*.coffee'
dest: 'tmp'
expand: true
ext: '.js'
concat: {
main: {
src: ['tmp/**/*.js'],
dest: 'dist/weaver-commons.js'
}
},
browserify:
main:
src: 'tmp/**/*.js'
dest: 'dist/weaver-commons.full.js'
options:
plugin: [
[
'remapify', [
'src': '**/*.js'
'expose': ''
'cwd': './tmp/'
]
]
]
uglify:
build:
src: 'dist/weaver-commons.js',
dest: 'dist/weaver-commons.min.js'
watch:
options:
spawn: false
files: ['**/*.coffee', '!_SpecRunner.html', '!.grunt']
tasks: ['default']
)
# Default task
grunt.registerTask('default', ['clean', 'coffee', 'browserify', 'watch'])
# Dist
grunt.registerTask('dist', ['clean', 'coffee', 'concat', 'browserify'])