deepak1556 / gulp-browserify

Bundle modules with BrowserifyJS
MIT License
195 stars 45 forks source link

how can i user that module like this? #90

Open MrKou47 opened 7 years ago

MrKou47 commented 7 years ago
const gulp = require('gulp');

const ts = require('gulp-typescript');

const browserify = require('gulp-browserify');

const babel = require('gulp-babel');

const nodemon = require('gulp-nodemon');

gulp.task('reloadServe', () => {
    gulp.src('./app/statics/js/*.ts')
        .pipe(ts({
            target: 'es5',
            module: 'commonjs'
        }))
        .pipe(browserify())
        .pipe(gulp.dest('./statics/js'))

now throw err:

        throw new Error(
        ^

Error: bundle() no longer accepts option arguments.
Move all option arguments to the browserify() constructor.
    at Browserify.bundle (D:\n_workspace\saweb\node_modules\.13.3.0@browserify\index.js:763:15)
    at Transform.transform [as _transform] (D:\n_workspace\saweb\node_modules\.0.5.1@gulp-browserify\index.js:121:27)
    at Transform._read (D:\n_workspace\saweb\node_modules\.1.0.34@readable-stream\lib\_stream_transform.js:184:10)
    at Transform._write (D:\n_workspace\saweb\node_modules\.1.0.34@readable-stream\lib\_stream_transform.js:172:12)
    at doWrite (D:\n_workspace\saweb\node_modules\.1.0.34@readable-stream\lib\_stream_writable.js:237:10)
    at writeOrBuffer (D:\n_workspace\saweb\node_modules\.1.0.34@readable-stream\lib\_stream_writable.js:227:5)
    at Transform.Writable.write (D:\n_workspace\saweb\node_modules\.1.0.34@readable-stream\lib\_stream_writable.js:194:11)
    at CompileStream.ondata (_stream_readable.js:555:20)
    at emitOne (events.js:96:13)
    at CompileStream.emit (events.js:188:7)