0.0.16 • Published 7 years ago

gulp-jspm-build v0.0.16

Weekly downloads
117
License
MIT
Repository
github
Last release
7 years ago

gulp-jspm-build

Gulp task to run jspm build and produce output as a Vinyl stream.

Build Status

Install

npm install gulp-jspm-build

Usage

var jspm = require('gulp-jspm-build');

gulp.task('jspm', function(){
    jspm({
        bundles: [
            { src: 'app', dst: 'app.js' }
        ]
    })
    .pipe(gulp.dest('.dist'));
});

Options

bundles

An array of bundles to create. Each object in the array specifies the arguments to systemjs-builder in following format.

src

string - Modules to bundle. You can use jspm arithmetic expressions here.

'app'
'core + navigation + app'
'app - react'

dst

string - Bundled file name.

options

object - Arguments to systemjs-builder.

{ minify: true, mangle: true }

bundleOptions

Same as options for individual bundle but specifies common options for all bundles.

config

Optional, the jspm configuration file to use.

configOverride

Override sections of config.js. This could be useful if you want to change things like baseURL.

configOverride: {
    baseURL: '/foo'
}

baseUrl

The jspm base URL, as normally specified in your package.json under config.jspm.directories.baseURL. Defaults to '.'.

bundleSfx

Create a single file executable, including all necessary dependencies and systemjs. Defaults to false.

See the jspm documentation for more information.

Example

var jspm = require('gulp-jspm-build');

gulp.task('jspm', function(){
    jspm({        
        bundleOptions: {
            minify: true,
            mangle: true
        }
        bundles: [
            { src: 'app', dst: 'app.js' }
            {
                src: 'react + react-router',
                dst: 'lib.js',
                options: { mangle: false }
            }
        ],
        configOverride: {
            baseURL: '/foo'
        }
    })
    .pipe(gulp.dest('.dist'));
});
0.0.16

7 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago