-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
51 lines (46 loc) · 1.4 KB
/
gruntfile.js
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
module.exports = function (grunt) {
grunt.initConfig({
concat: {
options: {
banner: '(function() {',
footer: '})();'
},
files: {
src: 'src/**/*.js',
dest: 'dist/linq.js'
}
},
jsdoc : {
dist : {
src: ['src/**/*.js'],
options: {
destination: 'docs'
}
}
},
karma: {
unit: {
configFile: 'karma.config.js'
}
},
// define source files and their destinations
uglify: {
files: {
src: 'dist/linq.js', // source files mask
dest: 'dist/', // destination folder
expand: true, // allow dynamic building
flatten: true, // remove all unnecessary nesting
ext: '.min.js' // replace .js to .min.js
}
}
});
// load plugins
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-jsdoc');
// register at least this one task
grunt.registerTask('build', ['concat', 'uglify']);
grunt.registerTask('release', ['concat', 'uglify', 'jsdoc']);
};