Fix code style
This commit is contained in:
parent
7da5778124
commit
532fa2da93
1 changed files with 13 additions and 13 deletions
26
gulpfile.js
26
gulpfile.js
|
@ -8,7 +8,7 @@ const source = require('vinyl-source-stream');
|
|||
const sass = require('gulp-sass');
|
||||
const autoprefixer = require('gulp-autoprefixer');
|
||||
const cleanCSS = require('gulp-clean-css');
|
||||
const rename = require("gulp-rename");
|
||||
const rename = require('gulp-rename');
|
||||
const replace = require('gulp-replace');
|
||||
|
||||
// Browserify
|
||||
|
@ -35,8 +35,8 @@ gulp.task('build-js', ['browserify'], cb => {
|
|||
gulp.src(['js/index.js', 'js/bundle.js']),
|
||||
babel({presets: ['env'], plugins: ['@babel/plugin-transform-object-assign']}),
|
||||
uglify(),
|
||||
rename({extname: ".min.js"}),
|
||||
gulp.dest('build/js')
|
||||
rename({extname: '.min.js'}),
|
||||
gulp.dest('build/js')
|
||||
], cb);
|
||||
});
|
||||
|
||||
|
@ -50,20 +50,20 @@ gulp.task('build-css', ['sass'], cb => {
|
|||
cascade: false
|
||||
}),
|
||||
cleanCSS({compatibility: 'ie8'}),
|
||||
rename({extname: ".min.css"}),
|
||||
rename({extname: '.min.css'}),
|
||||
gulp.dest('build/css')
|
||||
], cb);
|
||||
});
|
||||
|
||||
gulp.task('replace-path', cb =>{
|
||||
pump([
|
||||
gulp.src('index.html'),
|
||||
replace('src="js/', 'src="build/js/'),
|
||||
replace('.js', '.min.js'),
|
||||
replace('href="css/', 'href="build/css/'),
|
||||
replace('.css', '.min.css'),
|
||||
gulp.dest('./')
|
||||
], cb);
|
||||
gulp.task('replace-path', cb => {
|
||||
pump([
|
||||
gulp.src('index.html'),
|
||||
replace('src="js/', 'src="build/js/'),
|
||||
replace('.js', '.min.js'),
|
||||
replace('href="css/', 'href="build/css/'),
|
||||
replace('.css', '.min.css'),
|
||||
gulp.dest('./')
|
||||
], cb);
|
||||
});
|
||||
|
||||
// Build app
|
||||
|
|
Loading…
Add table
Reference in a new issue