gulp-include-source icon indicating copy to clipboard operation
gulp-include-source copied to clipboard

Nothing output

Open AidanNichol opened this issue 10 years ago • 3 comments

There is a problem which can result in nothing being added to the output html file.

I dug around a bit and the solution seems to be to include an option to specify the location of the javascript files that are to be included.

The current code assumes that the js/css files are located relative to the input file but that doesn't work once you start to do thing like build it with jade e.g.

gulp.src('./src/jade/*.jade')
.pipe(jade())
.pipe(includeSource())
.pipe(gulp.dest('./app'));

It is looking in ./src/jade for my scripts and I need a way to tell it to look in ./app or maybe ./src/js

AidanNichol avatar May 06 '14 19:05 AidanNichol

Hi @AidanNichol ! Sorry I didn't give an answer about that. I was on vacation and now things are really crazy at work, but I'll take a look as soon as possible :]

gil avatar May 26 '14 00:05 gil

Hi @AidanNichol , sorry it took so long to give you an answer. Could you please try version 0.0.5 with the following code:

gulp.src('src/jade/*.jade')
  .pipe(jade())
  .pipe(includeSource({ cwd : 'app/' }))
  .pipe(gulp.dest('app/'));

gil avatar Jul 28 '14 02:07 gil

This issue can be closed.

I tested what @gil suggested and it works just fine

codeorganic avatar Jun 02 '15 17:06 codeorganic