squarewolf / gulp-neuter

Unifies javascript source files in the order you require
MIT License
2 stars 6 forks source link

Unable to pipe data #8

Closed aleemb closed 8 years ago

aleemb commented 9 years ago

I have the following:

var paths = { /* ... */ };

gulp.task('js', function() {
  paths.js.forEach(function(glob) {
    gulp.src(glob)
      .pipe(neuter())
      .pipe(uglify())
      // ...
  });

Resulting in:

Error in plugin 'gulp-neuter'
Missing sourceFileName parameter
tvervest commented 8 years ago

Hey @aleemb,

I haven't looked at this project in quite some time, so I hope you discovered the solution on your own. Just for future record I'd like to document the solution to your problem, which is caused by bad documentation.

The gulp-neuter plugin required two parameters at minimum;

  1. the name of the source file (for use in the generated source map)
  2. the name of the output source map file (for use in the source map comment in the output file)

Starting in version 0.2.0 this has been resolved and your code should work as expected. In older versions simply adding two string parameters (the name of the output js file and the name of the output map file) should solve this problem.