0.1.0 • Published 10 years ago

grunt-tbp-win8encode v0.1.0

Weekly downloads
1
License
-
Repository
github
Last release
10 years ago

grunt-tbp-win8encode

Fix file encoding in Windows 8 Javascript apps.

Compiling a Windows 8 app written in Javascript requires the files to be UTF-8 encoded with BOM (Byte Order Mark), this reads files from the directories you pass it, and rewrites them as UTF-8 with BOM.

Getting Started

This plugin requires Grunt ~0.4.4

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-tbp-win8encode --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-tbp-win8encode');

The "tbp_win8encode" task

Overview

In your project's Gruntfile, add a section named tbp_win8encode to the data object passed into grunt.initConfig().

grunt.initConfig({
  tbp_win8encode: ['bower_components/**/*.*','js/**/*.*', 'pages/**/*.*']
  },
});

Usage Examples

Default Options

In this example, the task is passed the directories/files that should be checked for the correct encoding (UTF-8 with BOM) for a Windows 8 JS project.

grunt.initConfig({
  tbp_win8encode: ['bower_components/**/*.*','js/**/*.*', 'pages/**/*.*']
  },
});

Contributing

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

(Nothing yet)