https://github.com/sindresorhus/gulp-bom
Add a UTF-8 BOM to files
https://github.com/sindresorhus/gulp-bom
bom gulp-plugin javascript nodejs utf8
Last synced: 8 months ago
JSON representation
Add a UTF-8 BOM to files
- Host: GitHub
- URL: https://github.com/sindresorhus/gulp-bom
- Owner: sindresorhus
- License: mit
- Created: 2015-06-30T19:08:52.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2023-10-31T19:52:03.000Z (almost 2 years ago)
- Last Synced: 2025-01-28T20:23:09.421Z (8 months ago)
- Topics: bom, gulp-plugin, javascript, nodejs, utf8
- Language: JavaScript
- Size: 11.7 KB
- Stars: 9
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# gulp-bom
> Add a [UTF-8 BOM](https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) to files
From Wikipedia:
> The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8.
Gulp strips the BOM as it's useless. This is for the few dumb tools that do require it. Don't use this unless you really need to.
## Install
```sh
npm install --save-dev gulp-bom
```## Usage
```js
import gulp from 'gulp';
import bom from 'gulp-bom';export default () => (
gulp.src('app.js')
.pipe(bom())
.pipe(gulp.dest('dist'))
);
```