# gulp-jspm

> gulp plugin to build assets loaded with jspm/SystemJS

Latest version **0.5.13** (published 2016-07-25) · 0 weekly downloads

## Install

```sh
npm install gulp-jspm
pnpm add gulp-jspm
yarn add gulp-jspm
bun add gulp-jspm
```

## Health

**Score 18/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.13 |
| Published | 2016-07-25 |
| First published | 2015-09-10 |
| Weekly downloads | 0 |
| TypeScript types | separate (@types/gulp-jspm) |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 34 |
| Maintainers | brillout |
| Keywords | gulpplugin, jspm, systemjs |

## Links

- npm: https://www.npmjs.com/package/gulp-jspm
- Repository: https://github.com/brillout/gulp-jspm
- Homepage: https://github.com/brillout/gulp-jspm#readme
- Issues: https://github.com/brillout/gulp-jspm/issues
- npm.io page: https://npm.io/package/gulp-jspm

## Dependencies (8)

- [jspm](https://npm.io/package/jspm.md) ^0.16.34
- [temp](https://npm.io/package/temp.md) ^0.8.3
- [vinyl](https://npm.io/package/vinyl.md) ^1.1.1
- [liftoff](https://npm.io/package/liftoff.md) ^2.2.1
- [bluebird](https://npm.io/package/bluebird.md) ^3.3.5
- [through2](https://npm.io/package/through2.md) ^2.0.1
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.7
- [mini-assert](https://npm.io/package/mini-assert.md) ^1.0.7

## Recent versions

- 0.5.13 (latest) — 2016-07-25
- 0.5.12 — 2016-06-29
- 0.5.11 — 2016-06-24
- 0.5.10 — 2016-05-02
- 0.5.9 — 2016-05-02
- 0.5.8 — 2016-03-19
- 0.5.7 — 2016-02-19
- 0.5.6 — 2016-01-14
- 0.5.5 — 2015-11-26
- 0.5.4 — 2015-10-27
- 0.5.3 — 2015-10-18
- 0.5.2 — 2015-10-17
- 0.5.1 — 2015-10-17
- 0.4.1 — 2015-10-05
- 0.3.2 — 2015-10-02
- … 8 more at https://npm.io/package/gulp-jspm/versions

## README

`gulp-jspm` wraps the `jspm bundle moduleName` command line.

### Usage

```js
var gulp = require('gulp');
var gulp_jspm = require('gulp-jspm'); // npm install gulp-jspm

gulp.task('default', function(){
    return gulp.src('src/main.js')
        .pipe(gulp_jspm())
        .pipe(gulp.dest('build/'));
});
```

This will generate the `demo/build/jspm-bundle.js` file.
This file corresponds to the file generated by the command `jspm bundle main`.

Many code snippets shown in this Readme are implemented at [demo/gulpfile.js](demo/gulpfile.js).



###### Before Opening an Issue

When opening an issue, copy the debug logs in the ticket.
The debug logs are printed when running `gulp-jspm` with the verbose option `gulp_jspm({verbose: true})`.



###### Source Map

```js
var sourcemaps = require('gulp-sourcemaps');

gulp.src('src/main.js')
    .pipe(sourcemaps.init())
    .pipe(gulp_jspm())
    .pipe(sourcemaps.write('.'))
    .pipe(gulp.dest('build/'));
```


###### Options

```js
// exclude message.js from bundle
gulp.src('src/main.js')
    .pipe(gulp_jspm({arithmetic: '- message'}))
    .pipe(gulp.dest('build/'));

// `jspm bundle-sfx main`
gulp.src('src/main.js')
    .pipe(gulp_jspm({selfExecutingBundle: true}))
    .pipe(gulp.dest('build/'));

// `jspm bundle main.jsx!`
gulp.src('src/main.jsx')
    .pipe(gulp_jspm({plugin: true}))
    .pipe(gulp.dest('build/'));

// `jspm bundle main.jsx!jsx`
gulp.src('src/main.jsx')
    .pipe(gulp_jspm({plugin: 'jsx'}))
    .pipe(gulp.dest('build/'));

// print information logs about the internal progress of `gulp-jspm`
gulp.src('src/main.js')
    .pipe(gulp_jspm({verbose: true}))
    .pipe(gulp.dest('build/'));

// rename the bundled file
gulp.src('src/main.js')
    .pipe(gulp_jspm({fileName: 'other-name'})) // do not include file extension
    .pipe(gulp.dest('build/'));

// All other options given to gulp-jspm are passed on to jspm.
// All jspm options can therefore be passed to `gulp-jspm`
// (`minify`, `mangle`, `lowResSourceMaps`, etc.).
// For example:
gulp.src('src/main.js')
    .pipe(gulp_jspm({inject: true})) // `jspm bundle main --inject`
    .pipe(gulp.dest('build/'));
```


###### Original Entry Point

```js
gulp.src('src/main.js')
    .pipe(gulp_jspm())
    .pipe(pass(function(vinyl_file){
        assert( vinyl_file.relative === 'main.bundle.js' );
        assert( vinyl_file.originalEntryPoint.relative === 'main.js' );
    }));
```


### Run Gulpfile Demo

To run the code snippets above execute following commands.

```js
git clone git@github.com:brillout/gulp-jspm
cd gulp-jspm/
npm install
cd demo/
npm install
npm install -g jspm
npm install -g gulp
jspm install
gulp
gulp sourcemap
gulp test
```

---
_Source: https://npm.io/package/gulp-jspm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
