-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
48 lines (48 loc) · 1.48 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
module.exports = function(grunt) {
grunt.initConfig({
uglify: {
my_target: {
files: {
'./combunity-forums/public/js/combunity-ashes-public.min.js': ['./combunity-forums/public/js/combunity-ashes-public.js']
}
}
},
watch: {
files: [
'./combunity-forums/public/js/combunity-ashes-public.js'
],
tasks: ['uglify']
},
compress: {
build: {
options: {
archive: './dist/combunity-forums-' + grunt.template.today('yyyy-mm-dd') + '.zip',
mode: 'zip'
},
files: [
{ src : ['./combunity-forums/**'] }
]
}
},
wp_deploy: {
deploy: {
options: {
plugin_slug: 'combunity-forums',
plugin_main_file: 'combunity-ashes.php',
svn_user: 'fifthsegment',
build_dir: 'combunity-forums', //relative path to your build directory
assets_dir: 'wp-assets' //relative path to your assets directory (optional).
},
}
},
});
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-wp-deploy');
grunt.registerTask('uglifyup', ['uglify'] );
grunt.registerTask('default', ['watch'] );
grunt.registerTask('zipup', ['compress'] );
grunt.registerTask('wpdeploy', ['wp_deploy'] );
};