D
D
dhat2016-08-23 17:58:27
gulp.js
dhat, 2016-08-23 17:58:27

Where is the error in Gulp config?

I'm watching the screencast, the author has attached the project to GitHub and based on it installs Galp and creates a config. I repeat, but the console gives me an error:

[email protected]:~/beminar-1$ gulp
/home/fnk/beminar-1/gulpfile.js:9
  out: 'public',
     ^

SyntaxError: Unexpected token :
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)
    at Liftoff.<anonymous> (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:193:16)
    at module.exports (/usr/local/lib/node_modules/gulp/node_modules/flagged-respawn/index.js:17:3)

Project source - https://github.com/bem-events/beminar-1
Galp config with error:
var gulp = require('gulp');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var browserSync = require('browser-sync').create;
var reload = browserSync.reload;

var params = [
  out: 'public',
  htmlSrc: 'index.pink.html',
  levels: ['blocks', 'pink.blocks']
];

gulp.task('default', ['server', 'build']);

gulp.task('server', function() {
  browserSync.init([
    server: params.out
  ]);
});

gulp.task('build', ['html']);

gulp.task('html', function() {
  gulp.src(params.htmlSrc)
  .pipe(rename('index.html'))
  .pipe(gulp.dest(params.out))
});

What's wrong here, I don't know?
var params = [
  out: 'public',
  htmlSrc: 'index.pink.html',
  levels: ['blocks', 'pink.blocks']
];

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2016-08-23
@dhat

var params = {
  out: 'public',
  htmlSrc: 'index.pink.html',
  levels: ['blocks', 'pink.blocks']
};

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question