【文件属性】:
文件名称:gulp-bom:将UTF-8 BOM添加到文件
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-26 08:09:51
nodejs javascript gulp-plugin bom utf8
口香糖
将添加到文件
从*:
Unicode标准允许使用UTF-8中的BOM,但既不需要也不建议使用它。 字节顺序在UTF-8中没有意义。
Gulp会删除BOM表,因为它是无用的。 这是针对一些确实需要它的愚蠢工具。 除非确实需要,否则不要使用它。
安装
$ npm install --save-dev gulp-bom
用法
const gulp = require ( 'gulp' ) ;
const bom = require ( 'gulp-bom' ) ;
exports . default = ( ) => (
gulp . src ( 'app.js' )
. pipe ( bom ( ) )
. pipe ( gulp . dest ( 'dist' ) )
) ;
【文件预览】:
gulp-bom-main
----.gitattributes(19B)
----.github()
--------workflows()
----test.js(393B)
----license(1KB)
----.npmrc(19B)
----.editorconfig(175B)
----.gitignore(23B)
----index.js(471B)
----readme.md(605B)
----package.json(768B)