Gulp2Go

Installation

nodei.co

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 gulp2go

or add dependency manually:

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

Quick start

const gulp = require('gulp');
const {jsBundler,scssBundler,svgBundler} = require('gulp2go');
/** bundle with browserify **/
gulp.task('javascript',()=>{
    return 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 **/
gulp.task('styles',()=>{
    return scssBundler('path/to/*.scss','path/to/scss/dist')
});
/** make svg icon sprite **/
gulp.task('sprites',()=>{
    return scssBundler('path/to/*.ssvg','sprite.svg','path/to/svg/dist');
});

License

MIT

Author

Stepan Kosatyi, [email protected]

Stepan Kosatyi