2.2.2 • Published 9 years ago

gulp-babel-helpers v2.2.2

Weekly downloads
18
License
MIT
Repository
github
Last release
9 years ago

Gulp Babel External Helpers

A gulp plugin that replaces gulp-babel, it does the same thing except it also tracks what helpers are used and exports them as a seperate module and includes that require in each file that needs them. Allowing you use external helpers without polluting the global context.

babelHelpers(babelConfig, imaginaryLocationInSrc)

    gulp.src('./src/*.js')//------------V (where this file would be if it was in src )
        .pipe(transform(babelConfig, './helpers.js'))
        .pipe(gulp.dest('./lib')) // will end up with a ./lib/helpers.js file containing the bable helpers
  • babelConfig just a normal babel options object
  • imaginaryLocationInSrc - This is the location of the helpers file if it were to exist in your source directories, this tells the plugin how to build the require('./helpers') import for each file and so it can be added into the file stream usefully.
2.2.2

9 years ago

2.2.1

9 years ago

2.2.0

9 years ago

2.1.0

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago