stimpak-gulp-babel
v0.0.1
Published
Create dynamically loaded gulp tasks that automatically load plugins.
Downloads
1
Readme
stimpak gulp-babel
Create dynamically loaded gulp tasks that automatically load plugins.
Installation
$ npm install stimpak stimpak-gulp-babel -g
Usage
$ cd my-project-directory
$ stimpak gulp-babel
Dynamic Task & Plugin Loading
- Create a dynamic task file in the
./tasks
directory. - Install the gulp plugins you want to use normally via
npm
. - Use plugins without requiring or importing via the dynamic task.
- Gulp recognizes the new task automatically, so you can immediately use it on the command-line.
// ./tasks/do-something.js
module.exports = (gulp, plugins) => {
gulp.task("do-something", () => {
gulp.src("**/*.js")
.pipe(plugins.concat())
.pipe(gulp.dest("./dist/"));
});
};