tmp
Showing
1 changed file
with
12 additions
and
4 deletions
... | @@ -39,7 +39,9 @@ module.exports = function (grunt) { | ... | @@ -39,7 +39,9 @@ module.exports = function (grunt) { |
39 | }] | 39 | }] |
40 | }, | 40 | }, |
41 | }, | 41 | }, |
42 | rev: { | 42 | }; |
43 | if (common.useRev) { | ||
44 | initConfig.rev = { | ||
43 | css: { | 45 | css: { |
44 | files: { | 46 | files: { |
45 | src: _.map(common.css.options.dirs, function (value) { | 47 | src: _.map(common.css.options.dirs, function (value) { |
... | @@ -47,8 +49,8 @@ module.exports = function (grunt) { | ... | @@ -47,8 +49,8 @@ module.exports = function (grunt) { |
47 | }), | 49 | }), |
48 | } | 50 | } |
49 | }, | 51 | }, |
50 | }, | ||
51 | }; | 52 | }; |
53 | } | ||
52 | var checkList = []; | 54 | var checkList = []; |
53 | var buildList = [ | 55 | var buildList = [ |
54 | 'check', | 56 | 'check', |
... | @@ -119,6 +121,7 @@ module.exports = function (grunt) { | ... | @@ -119,6 +121,7 @@ module.exports = function (grunt) { |
119 | checkList.push('htmlmin'); | 121 | checkList.push('htmlmin'); |
120 | } | 122 | } |
121 | 123 | ||
124 | var htmlSourceDir; | ||
122 | if (common.punch) { | 125 | if (common.punch) { |
123 | grunt.registerMultiTask('punch', 'run punch externally to create html files', function() { | 126 | grunt.registerMultiTask('punch', 'run punch externally to create html files', function() { |
124 | var done = this.async(); | 127 | var done = this.async(); |
... | @@ -161,15 +164,18 @@ module.exports = function (grunt) { | ... | @@ -161,15 +164,18 @@ module.exports = function (grunt) { |
161 | }, | 164 | }, |
162 | }; | 165 | }; |
163 | buildList.push('punch:generate'); | 166 | buildList.push('punch:generate'); |
167 | htmlSourceDir = '.grunt/holygrail/punch/output-generate'; | ||
164 | initConfig.copy.dist.files.push({ | 168 | initConfig.copy.dist.files.push({ |
165 | expand: true, | 169 | expand: true, |
166 | dot: true, | 170 | dot: true, |
167 | cwd: '.grunt/holygrail/punch/output-generate', | 171 | cwd: htmlSourceDir, |
168 | dest: 'dist', | 172 | dest: 'dist', |
169 | src: [ | 173 | src: [ |
170 | '{,*/}*.html', | 174 | '{,*/}*.html', |
171 | ] | 175 | ] |
172 | }); | 176 | }); |
177 | } else { | ||
178 | htmlSourceDir = 'src'; | ||
173 | } | 179 | } |
174 | 180 | ||
175 | if (true) { | 181 | if (true) { |
... | @@ -181,7 +187,7 @@ module.exports = function (grunt) { | ... | @@ -181,7 +187,7 @@ module.exports = function (grunt) { |
181 | options: { | 187 | options: { |
182 | staging: '.grunt/usemin', | 188 | staging: '.grunt/usemin', |
183 | }, | 189 | }, |
184 | src: holyGrailTmp + '/punch/output-generate/{,**/}*.html', | 190 | src: htmlSourceDir + '/!(scripts){,**/}*.html', |
185 | }, | 191 | }, |
186 | }; | 192 | }; |
187 | initConfig.usemin = { | 193 | initConfig.usemin = { |
... | @@ -242,7 +248,9 @@ module.exports = function (grunt) { | ... | @@ -242,7 +248,9 @@ module.exports = function (grunt) { |
242 | //'modernizr'); | 248 | //'modernizr'); |
243 | //buildList.push('uglify:generated'); // montyPython | 249 | //buildList.push('uglify:generated'); // montyPython |
244 | //'rev:dist'); // montyPython | 250 | //'rev:dist'); // montyPython |
251 | if (common.useRev) { | ||
245 | buildList.push('rev:css'); // montyPython | 252 | buildList.push('rev:css'); // montyPython |
253 | } | ||
246 | //buildList.push('revconfig'); // montyPython | 254 | //buildList.push('revconfig'); // montyPython |
247 | //buildList.push('uglify:bower'); // montyPython | 255 | //buildList.push('uglify:bower'); // montyPython |
248 | //buildList.push('uglify:requireconfig'); // montyPython | 256 | //buildList.push('uglify:requireconfig'); // montyPython | ... | ... |
-
Please register or sign in to post a comment