# gulp-spm

> gulp plugin for cmd transport

Latest version **0.11.3** (published 2015-05-13) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.11.3 |
| Published | 2015-05-13 |
| First published | 2014-12-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 19 |
| Known vulnerabilities | 0 (+12 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 11 |
| Author | popomore |
| Maintainers | popomore, sorrycc |

## Links

- npm: https://www.npmjs.com/package/gulp-spm
- Repository: https://github.com/spmjs/gulp-spm
- Issues: https://github.com/spmjs/gulp-spm/issues
- npm.io page: https://npm.io/package/gulp-spm

## Dependencies (19)

- [debug](https://npm.io/package/debug.md) ^0.8.0
- [vinyl](https://npm.io/package/vinyl.md) ~0.4.3
- [extend](https://npm.io/package/extend.md) ~1.3.0
- [father](https://npm.io/package/father.md) ~0.13.0
- [mixarg](https://npm.io/package/mixarg.md) ~0.1.1
- [rename](https://npm.io/package/rename.md) ~1.0.0
- [css2str](https://npm.io/package/css2str.md) ~0.1.0
- [gulp-if](https://npm.io/package/gulp-if.md) ~1.2.1
- [is-type](https://npm.io/package/is-type.md) 0.0.1
- [crequire](https://npm.io/package/crequire.md) ~1.5.0
- [through2](https://npm.io/package/through2.md) ~0.6.2
- [duplexer2](https://npm.io/package/duplexer2.md) ~0.0.2
- [multipipe](https://npm.io/package/multipipe.md) ~0.1.1
- [handlebars](https://npm.io/package/handlebars.md) 1.3.0
- [css-imports](https://npm.io/package/css-imports.md) ~0.3.1
- [css-resources](https://npm.io/package/css-resources.md) ~0.1.0
- [gulp-reactify](https://npm.io/package/gulp-reactify.md) ~1.0.0
- [stream-switch](https://npm.io/package/stream-switch.md) ~0.1.0
- [spm-standalonify](https://npm.io/package/spm-standalonify.md) ~0.1.0

## Recent versions

- 0.11.3 (latest) — 2015-05-13
- 0.13.1 — 2015-05-06
- 0.13.0 — 2015-05-05
- 0.12.4 — 2015-05-05
- 0.12.3 — 2015-05-05
- 1.0.0 — 2015-05-04
- 0.12.2 — 2015-04-27
- 0.11.2 — 2015-04-20
- 0.12.1 — 2015-04-20
- 0.12.0 — 2015-03-20
- 0.11.1 — 2015-02-28
- 0.11.0 — 2015-02-27
- 0.10.4 — 2015-01-31
- 0.10.3 — 2015-01-30
- 0.10.2 — 2015-01-30
- … 6 more at https://npm.io/package/gulp-spm/versions

## README

# gulp-spm [![Build Status](https://travis-ci.org/spmjs/gulp-spm.png?branch=master)](https://travis-ci.org/spmjs/gulp-spm) [![Coverage Status](https://coveralls.io/repos/spmjs/gulp-spm/badge.png?branch=master)](https://coveralls.io/r/spmjs/gulp-spm?branch=master)

gulp plugin for cmd transport

name has changed after 0.9.x, old version see [gulp-transport](https://www.npmjs.com/package/gulp-transport)

---

## Install

```
$ npm install gulp-spm -g
```

## Usage

Transport will use pkg parsed by [father](https://github.com/popomore/father)

```
var Package = require('father').SpmPackage;
var transport = require('gulp-spm');
var pkg = new Package('path/to/module');
gulp.src(pkg.main)
  .pipe(transport({pkg: pkg}))
  .pipe(gulp.dest('path/to/dest'));
```

See [example](https://github.com/spmjs/gulp-spm/blob/master/test/parser.test.js)

### options

- pkg: package info parsed by father
- idleading: cmd id prefix, support simple template, E.g. `{{name}}/{{version}}`
- ignore: array that ignore to transport
- rename: option in [rename](https://github.com/popomore/rename)

### stream plugin

- transport.plugin.tpl: transport .tpl to .js
- transport.plugin.html: transport .html to .js
- transport.plugin.json: transport .json to .js
- transport.plugin.css2js: transport .css to .js
- transport.plugin.handlebars: transport .handlebars to .js
- transport.plugin.css: transport .css to .css
- transport.plugin.json: transport .json to .js

## LISENCE

Copyright (c) 2014 popomore. Licensed under the MIT license.

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