-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
32 lines (27 loc) · 1.09 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
module.exports = (grunt)->
grunt.initConfig
pkg : grunt.file.readJSON('package.json')
concat:
options:
separator: '\n\n'
stripBanners: true
banner: '# <%= pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %>\n\n'
dist:
src: ['src/main.coffee', 'src/services/*.coffee', 'src/directives/foundationModal.coffee', 'src/directives/openModal.coffee', 'src/directives/closeModal.coffee']
dest: 'build/<%= pkg.name %>.coffee'
uglify:
options:
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %> */\n\n'
build:
src: 'build/<%= pkg.name %>.js'
dest: 'build/<%= pkg.name %>.min.js'
coffee:
compileJoined:
options:
join: true
files:
'build/<%= pkg.name %>.js': ['src/directives/*.coffee','src/services/*.coffee']
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('default', ['uglify']);