Authored by ccbikai

更新 gulp 脚本

... ... @@ -25,7 +25,7 @@ const env = {
const config = require('../package.json');
const ftpConfig = {
host: '218.94.75.50',
host: '218.94.75.58',
user: 'php',
pass: 'yoho9646'
};
... ... @@ -125,7 +125,7 @@ const postcssPlugin = (et) => {
};
// default
gulp.task('default', ['postcss-dev', 'postcss-dev-h5', 'postcss-watch', 'webpack-dev-server']);
gulp.task('default', ['postcss-dev', 'postcss-watch', 'webpack-dev-server']);
// ge
gulp.task('ge', ['postcss', 'webpack']);
... ... @@ -148,19 +148,9 @@ gulp.task('postcss-dev', () => {
.pipe(gulp.dest('css/'));
});
// postcss compile in dev-h5
gulp.task('postcss-dev-h5', () => {
return gulp.src('m-scss/m-index.css')
.pipe(sourcemaps.init())
.pipe(postcss(postcssPlugin(env.dev)))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('css/'));
});
// postcss file watch
gulp.task('postcss-watch', () => {
gulp.watch('scss/**/*.css', ['postcss-dev']);
gulp.watch('m-scss/**/*.css', ['postcss-dev-h5']);
});
// copy assets
... ...