gulp-add-host

1.2.2 • Public • Published

gulp-add-host

add host and protocal for link and script tags in html file

功能

给html模版中所有script link img标签的资源链接地址添加域名。

使用方式

//引入
var addHost = require('gulp-add-host');

//task中使用
gulp.task('build:view', function() {
    gulp
        .src(VIEW)
        .pipe(addHost({
            script: 'http://cresauth.xxx.cn',
            link: 'http://cresauth1.xxx.cn',
            img: 'http://cresauth2.xxx.cn'
        }))
        .pipe(gulp.dest(VIEW_DEST));
});

Readme

Keywords

Package Sidebar

Install

npm i gulp-add-host

Weekly Downloads

1

Version

1.2.2

License

ISC

Last publish

Collaborators

  • realwall