javascript - Gulp livereload SyntaxError: Unexpected token . how to fix? -
when run gulp command error blow up
if have ideas how fix this, i'm ready listen)) ! if have ideas how fix this, i'm ready listen))
> c:\users\p.a.n.d.e.m.i.c\desktop\try\gulpfile.js:19 > .pipe(livereload()); > ^ syntaxerror: unexpected token . > @ createscript (vm.js:56:10) > @ object.runinthiscontext (vm.js:97:10) > @ module._compile (module.js:542:28) > @ object.module._extensions..js (module.js:579:10) > @ module.load (module.js:487:32) > @ trymoduleload (module.js:446:12) > @ function.module._load (module.js:438:3) > @ module.require (module.js:497:17) > @ require (internal/module.js:20:19) > @ liftoff.handlearguments (c:\users\p.a.n.d.e.m.i.c\appdata\roaming\npm\node_modules\gulp\bin\gulp.js:116:3)
there full code of gulpfile.js
var gulp = require('gulp'); var concatcss = require('gulp-concat-css'); var cleancss = require('gulp-clean-css'); var concat = require('gulp-concat'); var uglyfly = require('gulp-uglyfly'); var imagemin = require('gulp-imagemin'); var autoprefixer = require('gulp-autoprefixer'); var livereload = require('gulp-livereload'); gulp.task('css', function () { return gulp.src('static/css/*.css') .pipe(autoprefixer({ browsers: ['last 2 versions'], cascade: false })) .pipe(concatcss("styles/clean.min.css")) .pipe(cleancss({compatibility: 'ie8'})) .pipe(gulp.dest('static/min_css/')); .pipe(livereload()); }); gulp.task('js', function () { return gulp.src('static/js/*.js') .pipe(concat('all.js')) .pipe(uglyfly()) .pipe(gulp.dest('static/min_js/')); .pipe(livereload()); }); gulp.task('img', function () { return gulp.src('static/img/*') .pipe(imagemin()) .pipe(gulp.dest('static/img/')); .pipe(livereload()); }); gulp.task('default', function() { livereload.listen(); gulp.watch('static/css/*.css', ['css']); gulp.watch('static/js/*.js', ['js']); gulp.watch('static/img/*', ['img']); });
you ending statement on line before:
.pipe(gulp.dest('static/min_css/')); .pipe(livereload());
Comments
Post a Comment