|
2 | 2 | /*jslint node: true */ |
3 | 3 | /*jslint esversion: 6*/ |
4 | 4 | //TODO(shuwen): split into multiple files |
5 | | -//TODO(shuwen): replace path string concatenation with path.join |
6 | 5 |
|
7 | 6 | //node packages |
8 | 7 | var fs = require('fs'); |
@@ -79,7 +78,6 @@ gulp.task('patch-lib', function() { |
79 | 78 | gulp.src(C.PATCH_LIST, {base: j(__dirname, C.BOWER)}) |
80 | 79 | .pipe(dbg('patch-lib')) |
81 | 80 | .pipe(wrap(function(data) { |
82 | | - // console.log(data.file.contents.toString('utf8')); |
83 | 81 | if (data.file.contents.toString('utf8').indexOf('/*patched*/') !== -1) { |
84 | 82 | return "{{{contents}}}"; |
85 | 83 | } else { |
@@ -197,11 +195,11 @@ gulp.task('build', function(cb) { |
197 | 195 | run('copy',['sass','font'],'vulcanize',cb); |
198 | 196 | }); |
199 | 197 |
|
200 | | -// gulp.task('build:dist', function(cb) { |
201 | | -// run('clean','patch-lib', ) |
202 | | -// }); |
| 198 | +gulp.task('build:dist', function(cb) { |
| 199 | + run('clean','patch-lib', 'copy',['sass','font'], 'build:prod', cb); |
| 200 | +}); |
203 | 201 |
|
204 | | -gulp.task('build:prod', ['patch-lib', 'build'], function() { |
| 202 | +gulp.task('build:prod', function() { |
205 | 203 | var excludes = glob.sync(j(C.BUILD,C.MODULE_MASK, C.MODULE_HTML)); |
206 | 204 | excludes.push('bower_components/polymer/polymer.html'); |
207 | 205 |
|
|
0 commit comments