Beautify code written in javascript.
$ npm install apeman-task-js-beautify --save-dev
- Define a task within Apemanfile.js
- Call the task via apeman task command.
Apemanfile.js
/** This example Apemanfile to use apeman-task-js-beautify */
"use strict";
module.exports = {
$pkg: {/*...*/},
$tasks: {
// Define your own task.
'my-task-01': require('apeman-task-js-beautify')('some/pattern/**/*.js', {
//Options
beautifyOptions: {
'indent_size': 4
}
})
}
};
Then,
$ apeman task my-task-01
Key | Type | Default | Description |
---|---|---|---|
ignoreError | bool | false | ignore error |
ignore | string[]|string | [] | file patterns to ignore |
beautifyOptions | object | {} | options for js-beautify |
This software is released under the MIT License.