fmal / gulp-inline-source

Inline flagged js & css sources.
MIT License
212 stars 31 forks source link

Not working #6

Closed indolering closed 10 years ago

indolering commented 10 years ago
gulp.task('inlinesource', function () {

  return gulp.src('./src/test.html')
    .pipe(inlinesource())
    .pipe(gulp.dest("./spx/test/"));
});
<!DOCTYPE html>
<html>
<head>
  <script src="foo.js"  type='text/javascript' inline></script>
</head>
<body>

</body>
</html>
function foo(){
  console.log("foo");
}

Output:

<!DOCTYPE html>
<html>
<head>
  <script src="foo.js"  type='text/javascript'></script>
</head>
<body>

</body>
</html>
laneboysrc commented 10 years ago

Your gulpfile.js seems to be missing vital declerations:

var gulp = require("gulp");
var inlinesource = require('gulp-inline-source');

gulp.task('inlinesource', function () {
  return gulp.src('./src/test.html')
    .pipe(inlinesource())
    .pipe(gulp.dest("./spx/test/"));
});

If that does not fix your issue please add the output gulp prints when run.

fmal commented 10 years ago

It should work fine now, thanks for reporting.