nolanlawson / rollupify

Browserify transform to apply Rollup (UNMAINTAINED)
Apache License 2.0
386 stars 16 forks source link

Does not complain on invalid formats #61

Open binarykitchen opened 7 years ago

binarykitchen commented 7 years ago

When I pass on an invalid rollupjs format like sadfsdfsdf it does not complain. But should.

Here the gulp task I am using:

gulp.task('browserify', ['clean:js'], function (cb) {
  const entry = path.join(__dirname, '/src/index.js')
  const bundler = browserify({
    entries: [entry],
    basedir: __dirname,
    globals: false,
    debug: !options.minify // enables inline source maps
  })

  pump([
    bundler
      .transform('rollupify', {
        cache: cache,
        format: 'sadfsdfsdf', <------ why is not an error thrown?
        config: {
          format: 'sadfsdf' <------ why is not an error thrown?
        }
      })
      .require(entry, {expose: 'videomail-client'})
      .bundle(),
    source('./src/'), // gives streaming vinyl file object
    buffer(), // required because the next steps do not support streams
    plugins.concat('videomail-client.js'),
    gulp.dest('dist'),
    plugins.if(options.minify, plugins.sourcemaps.init()),
    plugins.if(options.minify, plugins.uglify()),
    plugins.if(options.minify, plugins.rename({suffix: '.min'})),
    plugins.if(options.minify, plugins.sourcemaps.write('/')),
    plugins.if(options.minify, gulp.dest('dist')),
    plugins.connect.reload()
  ], cb)
})
binarykitchen commented 7 years ago

ping @nolanlawson ?

nolanlawson commented 6 years ago

Yes, this appears to be a bug, thank you for reporting!