forked from needim/noty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
47 lines (43 loc) · 1.69 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
module.exports = function(grunt) {
grunt.initConfig({
bump : {
options: {
files : ['package.json', 'noty.jquery.json', 'bower.json', 'js/noty/jquery.noty.js'],
updateConfigs : [],
commit : false,
commitMessage : 'Release v%VERSION%',
commitFiles : ['-a'],
createTag : true,
tagName : 'v%VERSION%',
tagMessage : 'Version %VERSION%',
push : false,
pushTo : 'upstream',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d'
}
},
concat: {
dist: {
src : ['js/noty/jquery.noty.js', 'js/noty/layouts/*.js', 'js/noty/themes/*.js'],
dest: 'js/noty/packaged/jquery.noty.packaged.js'
}
},
uglify: {
options : {
preserveComments: function(a) {
return !!(a.start.file == 'js/noty/jquery.noty.js' && a.start.line == 11);
}
},
minifyJS: {
files: {
'js/noty/packaged/jquery.noty.packaged.min.js': ['js/noty/jquery.noty.js', 'js/noty/layouts/*.js', 'js/noty/themes/*.js']
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-bump');
grunt.registerTask('build', ['bump', 'concat', 'uglify:minifyJS']);
grunt.registerTask('conc', ['concat']);
grunt.registerTask('ugly', ['uglify:minifyJS']);
};