gulp-pure-cjs

0.1.4 • Public • Published

gulp-pure-cjs

Gulp plugin for pure-cjs

NPM version

Getting Started

  1. Install the module with: npm install gulp-pure-cjs --save-dev

  2. Add a task to your Gulpfile.js:

var pure = require('gulp-pure-cjs');
 
gulp.task('build', function() {
  
    return gulp.src('./lib/index.js')
        .pipe(pure({
            exports: 'my-exported-module'
        }))
        .pipe(gulp.dest('dist'));
});
 

Beware!

pure-cjs always re-read files from disk, so if you load other plugin in pipeline that changes file content, this changes will be lost!

Options

The options object you use to call the plugin is passed to pure-cjs transform method with some change:

  • dryRun is always set to true, in order to disable pure-cjs output file save
  • input is overwritten with filename received from gulp pipeline

For documentation on all other options available, see pure-cjs repo

Other stuff

  • documentation - maybe I will add documentation if you ask it. Open an issue for this.
  • support - open an issue here.

License

MIT © 2014, Andrea Parodi

Package Sidebar

Install

npm i gulp-pure-cjs

Weekly Downloads

0

Version

0.1.4

License

none

Last publish

Collaborators

  • parroit