• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

buddyspike/gulp-jspm-build: Gulp plugin for jspm.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

buddyspike/gulp-jspm-build

开源软件地址(OpenSource Url):

https://github.com/buddyspike/gulp-jspm-build

开源编程语言(OpenSource Language):

JavaScript 100.0%

开源软件介绍(OpenSource Introduction):

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人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap