-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
47 lines (42 loc) · 1.22 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) {
//Configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! validate <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd") %>) | RC Digital - https://github.com/rcdigital/validate | Free to use under terms of MIT license */\n'
},
all: {
files: {
'dist/validate.min.js': 'src/validate.js'
}
}
},
// Release task
bump: {
options: {
files: ['package.json', 'bower.json', 'README.md'],
updateConfigs: ['pkg'],
commit: true,
commitMessage: 'Release v%VERSION%',
commitFiles: ['-a'], // '-a' for all files
createTag: true,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'origin master',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d' // options to use with '$ git describe'
}
}
});
//Dependencies.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-bump');
//Tasks.
grunt.registerTask('default', ['uglify']);
grunt.registerTask('release', [
'bump-only',
'uglify',
'bump-commit'
]);
};