sindresorhus / gulp-template

Render/precompile Lodash templates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReferenceError: name is not defined

motss opened this issue · comments

For unknown reason, it forces me to add in the property name in order to use gulp-template.

...
  gulp.src(files)
    .pipe(gulpTemplate({
      name: 'random-name', // unknown required property `name`
      ... // rest of the data
    })
    ,pipe(gulp.dest(dest));
...

Looks like you there is an error in the "pipe chain".
,pipe(gulp.dest(dest));
Should start with .
The end result must be something like this:

...
gulp.src(files)
    .pipe(gulpTemplate({
      name: 'random-name', // unknown required property `name`
      ... // rest of the data
    })
    .pipe(gulp.dest(dest));
...