shannonmoeller / gulp-hb

A sane Gulp plugin to compile Handlebars templates. Useful as a static site generator.
http://npm.im/gulp-hb
MIT License
147 stars 14 forks source link

Nothing happening at all #45

Closed aish1550 closed 8 years ago

aish1550 commented 8 years ago

I have a very simple setup that I am trying to get working with the gulp-webapp yeoman generator.

const hb = require('gulp-hb');

gulp.task('pages', function () {
  return gulp
    .src('./src/posts/*.{html,hbs}')
    .pipe(hb({
      partials: './src/assets/partials/**/*.hbs'
    }))
    .pipe(gulp.dest('./'));
});

gulp.task('serve', ['pages','styles', 'scripts', 'fonts'], () => {
  browserSync({
    notify: false,
    port: 9000,
    server: {
      baseDir: ['.tmp', 'app'],
      routes: {
        '/bower_components': 'bower_components'
      }
    }
  });

  gulp.watch([
    'app/*.html',
    'app/images/**/*',
    '.tmp/fonts/**/*'
  ]).on('change', reload);

  gulp.watch('app/styles/**/*.scss', ['styles']);
  gulp.watch('app/scripts/**/*.js', ['scripts']);
  gulp.watch('app/fonts/**/*', ['fonts']);
  gulp.watch('bower.json', ['wiredep', 'fonts']);
});

But nothing happens. No files created. Is it just one of things where I can't have my cake and eat it too? Or in other words, I can't use the gulp-webapp generator and add gulp-hb to it?

shannonmoeller commented 8 years ago

I haven't used gulp-webapp. Have you tried running gulp pages directly instead of via the serve task?

shannonmoeller commented 8 years ago

Closing due to inactivity and no similar reported issues. Feel free to reopen if you're still having problems.