Merge pull request #39 from trevyn/master

Add PACKAGE_JSON_INDENT setting
This commit is contained in:
Radek 2018-10-27 19:03:28 +01:00 committed by GitHub
commit 5e1783715e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View file

@ -56,6 +56,7 @@ module.exports = {
SHORT: 'CUSTOM',
SILENT: false,
PACKAGE_JSON_PATH: './package.json',
PACKAGE_JSON_INDENT: 4,
components: {
AutoIncreaseVersion: true,
InjectAsComment: true,

View file

@ -113,7 +113,7 @@ export default class AutoIncreaseVersion {
// write new package.json file
fs.writeFile(
path.resolve(this.context.config.PACKAGE_JSON_PATH),
JSON.stringify(this.packageFile, null, 4), (err) => {
JSON.stringify(this.packageFile, null, this.context.config.PACKAGE_JSON_INDENT), (err) => {
if (err) {
this.reject(err);
console.log(err);

View file

@ -2,6 +2,7 @@ export default {
SHORT: 'AIV_SHORT',
SILENT: false,
PACKAGE_JSON_PATH: './package.json',
PACKAGE_JSON_INDENT: 4,
components: {
AutoIncreaseVersion: true,
InjectAsComment: true,