0

I can't use gulp-vulcanize in my side project. I've followed the example but nothing seems to happen, there are also no errors in the console.

Here is my folder structure:

build/
  - html/
  - css/
  - js/
source/
  - html/
  - css/
  - js/
bower.json
gulpfile.coffee
gulpfile.js
package.json

Here is the gulp task I'm using

gulp.task 'vulcanize',
  ->
    gulp.src 'index.html'
      .pipe plumber()
      .pipe vulcanize {
        abspath: ''
        excludes: []
        stripExcludes: false
      }
      .pipe gulp.dest 'vulcanized'

I'm using the following for vulcanizing my html files:

  • gulp - 3.9.0
  • gulp-vulcanize - 6.1.0
  • gul-crisper - 1.0.0
CRIS
  • 335
  • 3
  • 17

1 Answers1

0

There is no index.html file in the same directory as your gulpfile. So nothing can happen. Give it the proper path :

gulp.task 'vulcanize', ->
    gulp.src 'build/html/index.html'
        .pipe vulcanize()
        .pipe gulp.dest 'vulcanized'

Don't pass any option to vulcanuze(), as you're just passing its defaults, so it's useless.

BTW, Gulp accepts coffee files, you don't have to compile your gulpfile.coffee into gulpfile.js. Just go :

npm install -g coffee-script

gulp

> using gulpfile.coffee
Jeremy Thille
  • 26,047
  • 12
  • 43
  • 63
  • I've changed the gulp.src to be 'build/html/index.html' and also removed the options, but I still get the same result – CRIS Dec 29 '15 at 13:40
  • Its working now, the issue is about the paths of the files being imported by index.html, thanks for the help and tip – CRIS Dec 30 '15 at 09:51