...
|
...
|
@@ -112,7 +112,7 @@ gulp.task('default', ['postcss-dev', 'postcss-watch', 'webpack-dev-server']); |
|
|
gulp.task('postcss-dev', () => {
|
|
|
return gulp.src('scss/index.css')
|
|
|
.pipe(sourcemaps.init())
|
|
|
.pipe(postcssPlugin(env.dev))
|
|
|
.pipe(postcss(postcssPlugin(env.dev)))
|
|
|
.pipe(sourcemaps.write('.'))
|
|
|
.pipe(gulp.dest('css/'));
|
|
|
});
|
...
|
...
|
@@ -140,7 +140,7 @@ gulp.task('font', () => { |
|
|
// postcss compile in pro
|
|
|
gulp.task('postcss', ['assets'], () => {
|
|
|
return gulp.src('scss/index.css')
|
|
|
.pipe(postcssPlugin(env.pro))
|
|
|
.pipe(postcss(postcssPlugin(env.pro)))
|
|
|
.pipe(cssnano())
|
|
|
.pipe(gulp.dest(dist.css));
|
|
|
});
|
...
|
...
|
@@ -168,7 +168,10 @@ gulp.task('webpack-dev-server', () => { |
|
|
|
|
|
// webpack compile in pro
|
|
|
gulp.task('webpack', () => {
|
|
|
webpack(webpackConfig, (err, stats) => {
|
|
|
var proConfig = Object.assign({}, webpackConfig);
|
|
|
|
|
|
proConfig.output.path = dist.js;
|
|
|
webpack(proConfig, (err, stats) => {
|
|
|
if (err) {
|
|
|
throw new gutil.PluginError('webpack', err);
|
|
|
}
|
...
|
...
|
|