forked from sirap-group/tinymce-plugin-paginate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gruntfile.js
78 lines (72 loc) · 1.85 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
var shell = require("shelljs");
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
jshint: {
gruntfile: ['gruntfile.js'],
scripts: ['scripts/**/*.js'],
js: {
options: {
node: true,
browser: true,
browserify: true,
globals: {
'$': true,
'jQuery': true,
'tinymce': true
}
},
files: {
src: ['src/**/*.js']
}
}
},
browserify: {
dist: {
src: 'index.js',
dest: 'plugin.js'
}
},
uglify: {
dist: {
files: {
'plugin.min.js': ['plugin.js']
}
}
},
watch: {
gruntfile: {
files: 'Gruntfile.js',
tasks: ['jshint:gruntfile'],
},
js: {
files: ['src/**/*.js'],
tasks: ['jshint:js','browserify','watch'],
}
},
bump: {
options: {
files: ['package.json','bower.json'],
updateConfigs: [],
commit: true,
commitMessage: 'Release v%VERSION%',
commitFiles: ['package.json','bower.json'],
createTag: true,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'gh-sirap-group',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d',
globalReplace: false,
prereleaseName: false,
regExp: false
}
},
});
grunt.registerTask('jsdoc', function(){
shell.exec('npm run jsdoc');
});
grunt.registerTask('build', ['jshint', 'browserify', 'uglify', 'jsdoc']);
grunt.registerTask('dev', ['jshint', 'browserify', 'watch']);
grunt.registerTask('default', ['dev']);
};