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.
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-devOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-tbp-win8encode');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/**/*.*']
},
});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/**/*.*']
},
});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.
(Nothing yet)