Gulp2Go

Gulp bundlers for *.js *.scss and *.svg files.

Installation

Node

If you’re using NPM in your project, you can add gulp2go dependency to package.json with following command:

npm i --save-dev gulp gulp2go

or add dependency manually:

{
  "dependency": {
    "gulp2go":"^1.0"
  }
}

Quick start

const {task} = require('gulp');
const {jsBundler,scssBundler,svgBundler} = require('gulp2go');
/** bundle with browserify **/
task('javascript',()=>
    jsBundler('path/to/build.js','bundlefile.js','path/to/js/dist',{
        /** optional **/
        babelify:{
            extensions:['.tsx','.ts']
        },
        /** optional **/
        schemify:{
            'jquery':'$'
        },
        /** optional **/
        tsify:{
            target:'es6'
        }
    })
);
/** bundle with sass **/
task('styles',()=>
    scssBundler('path/to/*.scss','path/to/scss/dist')
);
/** make svg icon sprite **/
task('sprites',()=>
    scssBundler('path/to/*.svg','sprite.svg','path/to/svg/dist')
);

License

MIT

Author

Stepan Kosatyi, [email protected]

Stepan Kosatyi