-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
96 lines (90 loc) · 2.32 KB
/
Copy pathGruntfile.js
File metadata and controls
96 lines (90 loc) · 2.32 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
'use strict';
module.exports = function(grunt) {
// Load tasks
require('load-grunt-tasks')(grunt);
grunt.initConfig({
sass: {
dist: {
options: {
style: 'expanded',
compass: false,
// check: true,
require: [
'susy',
'breakpoint'
],
banner:
'/*!\n' +
'Theme Name: Port Metro Vancouver\n' +
'Version: 1.0\n' +
'Author: Edelman Digital Montreal\n' +
'Author URI: http://digital.edelman.ca\n' +
'Theme URI: http://digital.edelman.ca\n' +
'*/\n'
},
files: {
'theme/style.css': 'sass/style.scss'
}
}
},
watch: {
sass: {
files: [
'sass/**/*.scss',
'sass/*.scss'
],
tasks: ['sass', 'autoprefixer', 'criticalcss']
}
},
criticalcss: {
custom: {
options: {
url: "http://pmv-local.edlfb.net/",
width: 1200,
height: 900,
outputfile: "theme/critical.css",
filename: "theme/style.css", // Using path.resolve( path.join( ... ) ) is a good idea here
buffer: 800*1024,
ignoreConsole: false
}
}
},
browserSync: {
bsFiles: {
src : 'theme/style.css'
},
options: {
proxy: "http://pmv-local.edlfb.net/",
watchTask: true
}
},
autoprefixer: {
options: {
browsers: ['last 2 versions']
},
dist: {
files: {
'theme/style.css': 'theme/style.css'
}
}
}/*,
uncss: {
dist: {
options: {
stylesheets : ['wp-content/themes/edelv2/style.css'],
ignoreSheets : [/fonts.googleapis/],
csspath : 'wp-content/themes/edelv2/',
urls : ['http://grunt']
},
files: {
'http://grunt/wp-content/themes/edelv2/dist/style.css': ['http://grunt']
}
}
}*/
});
// Register tasks
grunt.registerTask('default',['watch']);
//use grunt dev during development for browserSync and Watch - HJK
grunt.registerTask('dev', ['browserSync', 'watch']);
grunt.registerTask('style', ['sass','autoprefixer']);
};