Skip to content

Instantly share code, notes, and snippets.

@spikebrehm
Created January 14, 2014 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spikebrehm/8424636 to your computer and use it in GitHub Desktop.
Save spikebrehm/8424636 to your computer and use it in GitHub Desktop.
Why is hbsfy not working? Where the heck does this error come from?
var gulp = require('gulp')
, browserify = require('gulp-browserify')
;
gulp.task('scripts', function() {
return gulp.src('./js/sample.js')
.pipe(browserify({
debug: true,
transform: ['hbsfy'],
}))
.pipe(gulp.dest('./build/'));
});
gulp.task('default', function() {
gulp.run('scripts');
gulp.watch('./js/**/*.js', function() {
gulp.run('scripts');
});
});
$ gulp
[gulp] Using file /Users/spike/code/onechrome/gulpfile.js
[gulp] Working directory changed to /Users/spike/code/onechrome
[gulp] Running 'default'...
[gulp] Running 'scripts'...
[gulp] Finished 'default' in 10 ms
/Users/spike/code/onechrome/js/sample.js
stream.js:94
throw er; // Unhandled stream error in pipe.
^
SyntaxError: Unexpected identifier
var templates = {};
templates.offices = require('./templates/offices.hbs');
console.log(templates);
@alanpeabody
Copy link

Yeah, I am sure as it matures error handling will improve.

Here is an early snapshot that I had working: https://gist.github.com/alanpeabody/7021d903961a3c9eab6e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment