node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »



Grunt task for rewrite file without UTF-8 BOM

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-bom2

Then add this line to your project's Gruntfile.js gruntfile:



Inside your Gruntfile.js file, add a section named bom2 with one or more targets. Each section contains a files object that specifies the files to rewrite without BOM.

Example #1

module.exports = function (grunt) {
  var config = {
    bom2: {},
  config.bom2 = {
    main: {
      src: [


In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Release History

  • 17/10/2012 - 0.1.0: Initial release.


Copyright (c) 2013 Stanislav Lesnikov Licensed under the MIT license.