# gulp-html-static

> change url or replace url or add prefix url

Latest version **1.0.3** (published 2016-08-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install gulp-html-static
pnpm add gulp-html-static
yarn add gulp-html-static
bun add gulp-html-static
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2016-08-10 |
| First published | 2016-08-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | zhe-he |
| Maintainers | zhe-he |

## Links

- npm: https://www.npmjs.com/package/gulp-html-static
- Repository: https://github.com/zhe-he/gulp-html-static
- Homepage: https://github.com/zhe-he/gulp-html-static#readme
- Issues: https://github.com/zhe-he/gulp-html-static/issues
- npm.io page: https://npm.io/package/gulp-html-static

## Recent versions

- 1.0.3 (latest) — 2016-08-10
- 1.0.2 — 2016-08-01
- 1.0.1 — 2016-08-01

## README

# [gulp-html-static](https://github.com/zhe-he/gulp-html-static)

> replace resources in html template.

## Install
```sh
npm install gulp-html-static --save
```
```git
git clone git@github.com:zhe-he/gulp-html-static.git
```

## demo
```test
npm run build
```

## gulpfile
```js
var gulp = require('gulp');
var static = require('gulp-html-static');

gulp.task('static', function () {
    return gulp.src('templates/**/*.html')
        .pipe( static({
            '/src/js/':  'http://static.xxx.com/src/js/',
            '/link/img/': 'http://static.xxx.com/img/',
        	'/${': 'http://static.xxx.com/${',
        	'other': function (str,index){
        		return "/change/"+str;
        	}
        
        }) )
        .pipe( gulp.dest('dist') );
});
```

### Options


```
"/src/js/" => "http://static.xxx.com/src/js/"
"/link/img/" => "http://static.xxx.com/img/"
"/${" => "http://static.xxx.com/${"
"other" => "return string"
```

## License

[MIT](http://opensource.org/licenses/MIT) © [zhe-he](mailto:luanhong_feiguo@sina.com)

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