checking max line length of a file.
This plugin requires Grunt ~0.4.5
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-line-length-check --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-line-length-check');
Run this task with the grunt line-length-check
command.
Type: String
Type: String
Default: utf8
Type: Array
Type: String
Default: character
character or byte.
Type: Number
Type: Boolean
grunt.initConfig({
'line-length-check': { // Task
basePath: 'src',
encoding: 'utf8',
excludePatterns: [ 'images', 'favicon.ico' ],
lengthUnit: 'character',
limitLength: 8 * 1024 * 0.98,
verbose: false
}
});
grunt.loadNpmTasks('grunt-line-length-check');
grunt.registerTask('default', ['grunt-line-length-check']);