# gulp-polymports

> Generator a HTML having HTML Import links

Latest version **0.2.0** (published 2015-04-17) · MIT license · 0 weekly downloads

## Install

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

## 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.2.0 |
| Published | 2015-04-17 |
| First published | 2015-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jimmy Moon |
| Maintainers | ragingwind |
| Keywords | polymer, vulcanize, gulpplugin, csp, chrome |

## Links

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

## Dependencies (5)

- [vinyl](https://npm.io/package/vinyl.md) ^0.4.3
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.0
- [through2](https://npm.io/package/through2.md) ^0.6.1
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.2
- [bower-config](https://npm.io/package/bower-config.md) ^0.5.2

## Recent versions

- 0.2.0 (latest) — 2015-04-17
- 0.1.2 — 2015-02-27
- 0.1.1 — 2015-01-24

## README

# [gulp](http://gulpjs.com)-polymports

> Generator a HTML having [HTML Import links](http://www.w3.org/TR/html-imports/#link-type-import) to pass it to vulcanize

## Install

```sh
$ npm install --save-dev gulp-polymports
```


## Usage

```js
var gulp = require('gulp');
var path = require('path');
var vulcanize = require('gulp-vulcanize');
var polymports = require('gulp-polymports');

gulp.task('default', function () {
  return polymports({
    "components.html": {
      imports: [
        'core-scaffold',
        'core-toolbar',
        'core-header-panel'
      ],
      basepath: require('bower-config').read().directory
    },
    "animations.html": {
      imports: [
        'core-ajax',
        'core-animation'
      ]
    }
  })
  .pipe(vulcanize({
    csp:true
  }))
  .pipe(gulp.dest('dist'));
});
```

## API

### polymports(configs)

The key name should be filename what you want. the name will be passed through [vinyl](http://goo.gl/rfHo00)'s path property on the stream. If configs type is string, that mean is config file as json, this plugin will try to load config data from file.

#### configs.imports

Type: `Array`

The component name list to import.

#### configs.basepath

Type: `String`

Pass a new base path If you want to change to what you want to it, which is not in .bowerrc.

## License

MIT @[ragingwind](http://github.com/ragingwind)

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