$ cnpm install ape-formatting
Format files
$ npm install ape-formatting --save
'use strict'
const apeFormatting = require('ape-formatting')
// Format javascript files
apeFormatting.formatJs('lib/*.js', {
ignore: 'index.js'
}).then(() => {
/* ... */
})
// Format json files
apeFormatting.formatJson('lib/*.json', {
indent: 2,
sort: true
}).then(() => {
/* ... */
})
This software is released under the MIT License.
Copyright 2014 - 2016 © taobao.org |