D
D
DevilPrado2019-10-22 16:17:04
css
DevilPrado, 2019-10-22 16:17:04

Problem when running GULP, how to fix errors?

let gulp = require('gulp'),
sass = require('gulp-sass'),
browserSync = require('browser-sync'),
uglify = require('gulp-uglify'),
concat = require('gulp- concat'),
rename = require('gulp-rename'),
del = require('del'),
autoprefixer = require('gulp-autoprefixer');
gulp.task('clean', async function(){
del.sync('dist')
})
gulp.task('scnpm iss', function(){
return gulp.src('app/scss/**/* .scss')
.pipe(sass({outputStyle: 'compressed'}))
.pipe(autoprefixer({
overrideBrowserslist: ['last 8 versions'
.pipe(gulp.dest('app/css'))
.pipe(browserSync.reload({stream: true}))
});
gulp.task('css', function(){
return gulp.src([
'node_modules/normalize.css/normalize.css',
'node_modules/slick-carousel/slick/slick.css',
])
.pipe(concat ('_libs.scss'))
.pipe(gulp.dest('app/scss'))
.pipe(browserSync.reload({stream: true}))
});
gulp.task('html', function(){
return gulp.src('app/*.html')
.pipe(browserSync.reload({stream: true}))
});
gulp.task('script', function(){
return gulp.src('app/js/*.js')
.pipe(browserSync.reload({stream:
gulp.task('js', function(){
return gulp.src([
'node_modules/slick-carousel/slick/slick.js'
])
.pipe(concat('libs.min.js'))
.pipe( uglify())
.pipe(gulp.dest('app/js'))
.pipe(browserSync.reload({stream: true}))
});
gulp.task('browser-sync', function() {
browserSync.init({
server: {
baseDir: "app/"
}
});
});
gulp.task('export', function(){
let buildHtml = gulp.src('app/**/*.html')
.pipe(gulp.dest('dist'));
let BuildCss = gulp.src( 'app/css/**/*.css')
.pipe(gulp.dest('
let BuildJs = gulp.src('app/js/**/*.js')
.pipe(gulp.dest('dist/js'));
let BuildFonts = gulp.src('app/fonts/**/*.*')
.pipe(gulp.dest('dist/fonts'));
let BuildImg = gulp.src('app/img/**/*.*')
.pipe(gulp.dest('dist/img'));
});
gulp.task('watch', function(){
gulp.watch('app/scss/**/*.scss', gulp.parallel('scss'));
gulp.watch('app/*.html' , gulp.parallel('html'))
gulp.watch('app/js/*.js', gulp.parallel('script'))
});
gulp.task('build', gulp.series('clean', 'export'))
gulp.task('default', gulp.parallel('css' ,'scss', '5daf01499e83f020439939.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question