-
Notifications
You must be signed in to change notification settings - Fork 4
/
gruntfile.js
54 lines (48 loc) · 1.39 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
module.exports = function(grunt) {
grunt.initConfig({
sass: {
dev: {
files: {
'style.css': 'sass/style.scss',
'responsive.css': 'sass/responsive.scss',
},
sourceComments: true
},
dist: {
files: {
'style.css': 'sass/style.scss',
'responsive.css': 'sass/responsive.scss',
},
sourceComments: true,
options: { 'no-source-map': '' }
},
},
uglify: {
my_target: {
files: {
'js/navigation.min.js': 'js/navigation.js',
'js/skip-link-focus-fix.min.js': 'js/skip-link-focus-fix.js',
'js/theme.min.js': 'js/theme.js',
'inc/customizer/customizer-controls.min.js': 'inc/customizer/customizer-controls.js',
'inc/customizer/customizer.min.js': 'inc/customizer/customizer.js',
'inc/customizer/custom-controls/spacing-control.min.js': 'inc/customizer/custom-controls/spacing-control.js',
'inc/customizer/custom-controls/font-selector-assets/js/select.min.js': 'inc/customizer/custom-controls/font-selector-assets/js/select.js',
}
},
},
watch: {
css: {
files: ['sass/**/*.scss'],
tasks: ['sass'],
options: {
livereload: true,
},
},
},
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['sass:dev', 'uglify']);
grunt.registerTask('dist', ['sass', 'uglify']);
};