forked from esvit/ng-table-export
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Gruntfile.coffee
48 lines (43 loc) · 1.42 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'
# Build configurations.
module.exports = (grunt) ->
grunt.initConfig
cmpnt: grunt.file.readJSON('bower.json'),
banner: '/*! ngTableExport v<%= cmpnt.version %> by Vitalii Savchuk([email protected]) - ' +
'https://github.com/esvit/ng-table-export - New BSD License */\n',
# Deletes built file and temp directories.
clean:
working:
src: [
'ng-table.*'
'./.temp/views'
'./.temp/'
]
uglify:
# concat js files before minification
js:
src: ['ng-table-export.src.js']
dest: 'ng-table-export.js'
options:
banner: '<%= banner %>'
sourceMap: (fileName) ->
fileName.replace /\.js$/, '.map'
concat:
# concat js files before minification
js:
src: [
'src/scripts/*.js'
]
dest: 'ng-table-export.src.js'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.registerTask 'dev', [
'clean'
'concat'
]
grunt.registerTask 'default', [
'dev'
'uglify'
]