-
Notifications
You must be signed in to change notification settings - Fork 9
/
Gruntfile.js
71 lines (69 loc) · 1.6 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
/*global module, require */
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-wp-i18n');
//grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.initConfig({
sass: {
options: {
sourceMap: true,
outputStyle: 'nested',
sourceComments: false
},
dist: {
files: {
'styles/editor-interface.css': 'styles/editor-interface.scss',
'styles/build/admin.css': 'styles/sass/admin/admin.scss'
}
}
},
cssmin: {
//minify: {
// src: 'styles/global.css',
// dest: 'styles/global.min.css'
//}
options: {
sourceMap: true
},
target: {
files: {
'styles/global.min.css': ['styles/global.css'],
'styles/global-rtl.min.css': ['styles/global-rtl.css'],
'styles/editor-interface.min.css': ['styles/editor-interface.css'],
'elements/upfront-newnavigation/css/unewnavigation-style.min.css': ['elements/upfront-newnavigation/css/unewnavigation-style.css']
}
}
},
//uglify: { We don't need this since main.js is already optimized by requirejs optimizer
// options: {
// mangle: false,
// sourceMap: true
// },
// targets: {
// files: {
// 'build/main.min.js': ['build/main.js']
// }
// }
//},
watch: {
sass: {
files: ['**/*.scss'],
tasks: ['sass'],
options: {
spawn: false
}
}
},
makepot: {
target: {
options: {
domainPath: 'languages/',
type: 'wp-theme'
}
}
}
});
grunt.registerTask('default', ['sass', 'cssmin']);
};