Package Exports
- grunt-jsbeautifier
- grunt-jsbeautifier/tasks/jsbeautifier
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (grunt-jsbeautifier) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
grunt-jsbeautifier
jsbeautifier.org for grunt
Getting Started
Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-jsbeautifier
Then add this line to your project's grunt.js
gruntfile:
grunt.loadNpmTasks('grunt-jsbeautifier');
Config
- jsbeautifier
- files (required): Your source files to beautify
- options (optional): Overwrite default jsbeautifier options
- Minimum config
"jsbeautifier" : {
files : ["src/**/*.js"]
}
Default options from jsbeautifier.org will be used
- Complete config
"jsbeautifier" : {
files : ["src/**/*.js"],
options : {
"indent_size": 4,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"jslint_happy": false,
"brace_style": "collapse",
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": true,
"eval_code": false,
"indent_case": false,
"unescape_strings": false
}
}
Only specifiy options to overwrite
Release History
- 0.1.0: Initial version.
- 0.1.1: Readme file changes
- 0.1.2: Supported grunt 0.4~.
- 0.1.3: Added fix for block comment formatting.
License
Copyright (c) 2012 Vishal Kadam
Licensed under the MIT license.