From 0baa2e77942b1f976f365b1fd39725cd3f9e2d05 Mon Sep 17 00:00:00 2001 From: Andrew Miller Date: Mon, 14 Aug 2017 22:34:23 +0900 Subject: [PATCH] Change indent for package.json from 2 to 4 spaces Minor style issue more than anything. If using `php artisan preset` it will use PHP's `JSON_PRETTY_PRINT` to rewrite the file (https://github.com/laravel/framework/blob/master/src/Illuminate/Foundation/Console/Presets/Preset.php#L44). `JSON_PRETTY_PRINT` uses four spaces for indentation, causing the entire file contents to be altered upon a diff. Rather than adding logic to change the indentation after executing `json_encode()` in `Illuminate\Foundation\Console\Presets\Preset`, it seems easier to just fix the default indentation in `package.json`. NPM doesn't seem to change the spacing at all, so this seems like a happy medium. --- package.json | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 630a2442..dedcbef7 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,21 @@ { - "private": true, - "scripts": { - "dev": "npm run development", - "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch-poll": "npm run watch -- --watch-poll", - "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", - "prod": "npm run production", - "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" - }, - "devDependencies": { - "axios": "^0.16.2", - "bootstrap-sass": "^3.3.7", - "cross-env": "^5.0.1", - "jquery": "^3.1.1", - "laravel-mix": "^1.0", - "lodash": "^4.17.4", - "vue": "^2.1.10" - } + "private": true, + "scripts": { + "dev": "npm run development", + "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", + "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", + "watch-poll": "npm run watch -- --watch-poll", + "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", + "prod": "npm run production", + "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" + }, + "devDependencies": { + "axios": "^0.16.2", + "bootstrap-sass": "^3.3.7", + "cross-env": "^5.0.1", + "jquery": "^3.1.1", + "laravel-mix": "^1.0", + "lodash": "^4.17.4", + "vue": "^2.1.10" + } }