gulp-substituter:将文件中匹配的字符串替换为定义的值

时间:2021-07-14 14:28:18
【文件属性】:
文件名称:gulp-substituter:将文件中匹配的字符串替换为定义的值
文件大小:7KB
文件格式:ZIP
更新时间:2021-07-14 14:28:18
JavaScript 吞咽替代品 将文件中匹配的字符串替换为定义的值 安装 $ npm install --save-dev gulp-substituter 吞咽用法 gulpfile.js var substituter = require ( 'gulp-substituter' ) ; gulp . task ( 'replace' , function ( ) { return gulp . src ( 'index.html' ) . pipe ( substituter ( { title : 'website' } ) ) . pipe ( gulp . dest ( 'dist' ) ) } ) ; 索引.html <!DOCTYPE html > < html lang =" en " > < head > < meta charset
【文件预览】:
gulp-substituter-master
----.gitignore(13B)
----package.json(626B)
----.travis.yml(39B)
----index.js(796B)
----README.md(1KB)
----lib()
--------replace.js(3KB)
----test()
--------replace_test.js(4KB)
--------fixtures()
--------substituter_test.js(577B)

网友评论