# gulp-html-url-prefix

> a gulp plugin for set html url prefix

Latest version **0.1.2** (published 2017-08-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-html-url-prefix
pnpm add gulp-html-url-prefix
yarn add gulp-html-url-prefix
bun add gulp-html-url-prefix
```

## 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.1.2 |
| Published | 2017-08-30 |
| First published | 2016-07-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | idler |
| Maintainers | idler_z |
| Keywords | gulp, html, plugin, prefix |

## Links

- npm: https://www.npmjs.com/package/gulp-html-url-prefix
- Repository: https://github.com/Justinidlerz/gulp-html-url-prefix
- Homepage: https://github.com/Justinidlerz/gulp-html-url-prefix#readme
- Issues: https://github.com/coderhaoxin/gulp-file-include/issues
- npm.io page: https://npm.io/package/gulp-html-url-prefix

## Dependencies (6)

- [extend](https://npm.io/package/extend.md) ^3.0.0
- [flatnest](https://npm.io/package/flatnest.md) ^1.0.0
- [through2](https://npm.io/package/through2.md) ^2.0.1
- [fastparse](https://npm.io/package/fastparse.md) ^1.1.1
- [concat-stream](https://npm.io/package/concat-stream.md) ^1.5.1
- [balanced-match](https://npm.io/package/balanced-match.md) ^0.2.1

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2017-08-30
- 0.1.1 — 2016-07-01
- 0.1.0 — 2016-07-01

## README

<!-- [![NPM version][npm-img]][npm-url]
[![Build status][travis-img]][travis-url]
[![Test coverage][coveralls-img]][coveralls-url]
[![License][license-img]][license-url]
[![Dependency status][david-img]][david-url] -->

### gulp-html-url-prefix
a plugin of gulp for prefix url

### install
```bash
npm install gulp-html-url-prefix
```

### options

* options - type: `object`
  - prefix: `string`, default ` `

```js
urlPrefix({
  prefix: '//cdn.xxx.com'
})
```

### example

index.html
```html
<!DOCTYPE html>
<html>
  <head>
    <link href="./css/example.css" />
  </head>
  <body>
    <img src="./example.jpg" />
    <script type="text/javascript" src="./js/example.js"></script>
  </body>
</html>
```

gulpfile.js
```js
var urlPrefix = require('gulp-html-url-prefix'),
  gulp = require('gulp');

gulp.task('url', function() {
  gulp.src(['index.html'])
    .pipe(urlPrefix({
      prefix: '//cdn.xxx.com'
    }))
    .pipe(gulp.dest('./'));
});
```

and the result is:
```html
<!DOCTYPE html>
<html>
  <head>
    <link href="//cdn.xxx.com/css/example.css" />
  </head>
  <body>
    <img src="//cdn.xxx.com/example.jpg" />
    <script type="text/javascript" src="//cdn.xxx.com/js/example.js"></script>
  </body>
</html>
```


### License
MIT
<!-- 
[npm-img]: https://img.shields.io/npm/v/gulp-file-include.svg?style=flat-square
[npm-url]: https://npmjs.org/package/gulp-file-include
[travis-img]: https://img.shields.io/travis/coderhaoxin/gulp-file-include.svg?style=flat-square
[travis-url]: https://travis-ci.org/coderhaoxin/gulp-file-include
[coveralls-img]: https://img.shields.io/coveralls/coderhaoxin/gulp-file-include.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/coderhaoxin/gulp-file-include?branch=master
[license-img]: http://img.shields.io/badge/license-MIT-green.svg?style=flat-square
[license-url]: http://opensource.org/licenses/MIT
[david-img]: https://img.shields.io/david/coderhaoxin/gulp-file-include.svg?style=flat-square
[david-url]: https://david-dm.org/coderhaoxin/gulp-file-include
[gitter-img]: https://badges.gitter.im/Join%20Chat.svg
[gitter-url]: https://gitter.im/coderhaoxin/gulp-file-include?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
 -->

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