gulp-bom

Add a UTF-8 BOM to files


Keywords
gulpplugin, bom, byte, order, mark, utf8, utf-8, add, prepend
License
MIT
Install
npm install gulp-bom@2.0.0

Documentation

gulp-bom Build Status

Add a UTF-8 BOM 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

$ npm install --save-dev gulp-bom

Usage

var gulp = require('gulp');
var bom = require('gulp-bom');

gulp.task('default', function () {
	return gulp.src('app.js')
		.pipe(bom())
		.pipe(gulp.dest('dist'));
});

License

MIT © Sindre Sorhus