gulp-html-path
rewrite path as absolute or relative
路径处理为绝对路径或相对路径
Install
$ npm install --save-dev gulp-html-path
Usage
const gulp = ;const gulpHtmlPath = ; const sourcePath = 'source';const src = 'source/**/*.html' 'source/**/*.js' 'source/**/*.css';const buildPath = 'dist'; gulp;
gulp v3
const gulp = ;const gulpHtmlPath = ; const sourcePath = 'source';const src = 'source/**/*.html' 'source/**/*.js' 'source/**/*.css';const buildPath = 'dist'; gulp;
API
gulpHtmlPath(options)
options.base
Type: string
Default: ./
base path of frontend source code
options.mode
Type: string
Default: absolute
build path mode ['absolute'|'relative']
options.prefix
Type: string
Default: ``
add the prefix string to each replacement
options.isLog
Type: boolean
Default: false
show detail logs
API
gulpHtmlPath(options)
options.base
Type: string
Default: ./
前端源码目录
options.mode
Type: string
Default: absolute
生成路径模式 ['absolute'|'relative']
options.prefix
Type: string
Default: ``
添加前缀
options.isLog
Type: boolean
Default: false
显示更多详细日志