-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
117 lines (101 loc) · 2.7 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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/**
npm install grunt --save-dev
npm install grunt-contrib-less --save-dev
npm install grunt-contrib-watch --save-dev
npm install grunt-notify --save-dev
npm install grunt-exec --save-dev
npm install grunt-contrib-concat --save-dev
npm install grunt-contrib-cssmin --save-dev
*/
module.exports = function (grunt) {
'use strict';
// Force use of Unix newlines
grunt.util.linefeed = '\n';
// Project configuration.
grunt.initConfig({
cssmin: {
css_dist: {
src: ['design/standard/stylesheets/frontend/ezengage.css'/*, 'design/standard/stylesheets/frontend/test.css'*/],
dest: 'design/standard/stylesheets/frontend/ezengage.min.css',
},
},
exec: {
clear_cache: {
command: 'php bin/php/ezcache.php --clear-id=global_ini,ini,classid,template,template-block,content,template-override,rss_cache,design_base',
cwd: '../../'
}
},
less: {
compileCore: {
options: {
strictMath: true,
outputSourceFiles: true
},
src: 'design/standard/less/frontend/ezengage.less',
dest: 'design/standard/stylesheets/frontend/ezengage.css'
}
/*
compileCore2: {
options: {
strictMath: true,
outputSourceFiles: true
},
src: 'design/standard/stylesheets/ezengage.less',
dest: 'design/standard/stylesheets/ezengage.css'
},
*/
},
notify: {
less: {
options: {
title: 'LESS compile',
message: 'LESS completed successfully'
},
},
},
jshint: {
gruntfile: {
src: [
'Gruntfile.js',
],
options: {
// Rules
curly : true,
newcap : true,
browser : true,
// warnings
eqnull : true,
multistr : true,
loopfunc : true,
}
}
},
watch: {
/*
gruntfile: {
files: 'Gruntfile.js',
tasks: ['jshint:gruntfile'],
},
*/
less: {
files: 'design/standard/less/frontend/*.less',
tasks: [
'less-compile',
'notify:less',
'cssmin:css_dist',
'exec:clear_cache',
]
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-cssmin');
// CSS distribution task.
grunt.registerTask('less-compile', ['less:compileCore'/*, 'less:compileCore2'*/]);
// Default task.
grunt.registerTask('default', ['watch']);
};