-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
58 lines (50 loc) · 1.66 KB
/
Gruntfile.js
File metadata and controls
58 lines (50 loc) · 1.66 KB
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
function config(name) {
return require('./build/grunts/' + name + '.js');
}
module.exports = function(grunt) {
grunt.initConfig({
// jshint : config('jshint'),
// cssmin : config('cssmin'),
copy : config('copy'),
uglify : config('uglify'),
less : config('less'),
watch : config('watch'),
watchify: config('watchify'),
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-watchify');
var wp_pagebuilder_watch = [
'watchify:pagebuilder',
'watch:wp_pagebuilder'
];
var wp_themebuilder_watch = [
'watchify:themebuilder',
'watch',
];
var wp_pagebuilder_dist = [
'less',
'watchify:pagebuilder',
'uglify:pagebuilder',
'copy:wp_pagebuilder_dist',
// Copy files to the Standalone App also
'copy:pagebuilder_dist',
];
var wp_themebuilder_dist = [
'less:themebuilder',
'watchify:themebuilder',
'uglify:themebuilder',
'copy:wp_themebuilder_dist',
// Copy files to the Standalone App also
'copy:pagebuilder_dist',
];
// Shortcuts
grunt.registerTask('default', wp_themebuilder_watch);
grunt.registerTask('dist' , wp_themebuilder_dist);
// Specifics
grunt.registerTask('wp_pagebuilder_watch', wp_pagebuilder_watch);
grunt.registerTask('wp_pagebuilder_dist' , wp_pagebuilder_dist);
};