Skip to content

Commit 0c6ae12

Browse files
authored
feat: improve package json sorting (#102)
1 parent d7c8cfa commit 0c6ae12

File tree

3 files changed

+33
-79
lines changed

3 files changed

+33
-79
lines changed

package-lock.json

Lines changed: 15 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
{
22
"name": "create-exposed-app",
3+
"version": "0.0.0-development",
34
"description": "App generator with everything exposed for maximum control (powered by TS, Babel, Jest, ESLint, Prettier, CircleCI, and more)",
4-
"license": "MIT",
5-
"author": "Matt Turnbull <[email protected]> (https://iamturns.com)",
65
"homepage": "https://github.com/iamturns/create-exposed-app",
6+
"bugs": {
7+
"url": "https://github.com/iamturns/create-exposed-app/issues"
8+
},
79
"repository": {
810
"type": "git",
911
"url": "https://github.com/iamturns/create-exposed-app.git"
1012
},
11-
"bugs": {
12-
"url": "https://github.com/iamturns/create-exposed-app/issues"
13-
},
14-
"version": "0.0.0-development",
13+
"license": "MIT",
14+
"author": "Matt Turnbull <[email protected]> (https://iamturns.com)",
1515
"main": "dist/create-exposed-app.js",
1616
"bin": {
1717
"create-exposed-app": "dist/create-exposed-app-cli.js"
1818
},
1919
"scripts": {
20-
"pre-commit": "lint-staged",
2120
"build": "run-p --print-label build-src build-dts",
2221
"build--watch": "onchange 'src/**/*' --initial --kill --delay 1000 -- npm run build",
2322
"build-dts": "tsc --emitDeclarationOnly",
@@ -32,12 +31,13 @@
3231
"format-doctoc": "doctoc --maxlevel 3 --notitle ./README.md ./DEVELOPING.md",
3332
"format-eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx --fix ./ >/dev/null 2>&1 || true",
3433
"format-imports": "import-sort --write '**/*.{js,jsx,ts,tsx}'",
35-
"format-package-json": "prettier-package-json --write",
34+
"format-package-json": "sort-package-json",
3635
"format-prettier": "prettier --write '**/*.{css,gql,graphql,html,js,jsx,json,less,md,mdx,scss,ts,tsx,vue,yaml,yml}' '.editorconfig' 'LICENSE'",
3736
"lint": "run-p lint-eslint lint-markdown",
3837
"lint--watch": "onchange 'src/**/*' --initial --kill --delay 1000 -- npm run lint",
3938
"lint-eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./",
4039
"lint-markdown": "markdownlint --ignore coverage --ignore dist --ignore examples --ignore node_modules '**/*.md' '.**/**/*.md'",
40+
"pre-commit": "lint-staged",
4141
"prepublish": "rimraf dist && npm run build",
4242
"start": "node --require dotenv/config dist/create-exposed-app-cli.js",
4343
"start--dev": "NODE_ENV=development npm run start",
@@ -103,8 +103,8 @@
103103
"npm-run-all": "^4.1.5",
104104
"onchange": "^5.2.0",
105105
"prettier": "^1.16.2",
106-
"prettier-package-json": "^2.1.0",
107106
"rimraf": "^2.6.3",
107+
"sort-package-json": "^1.22.1",
108108
"typescript": "^3.4.1"
109109
}
110110
}

templates/package.json.template

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
{
22
"name": "<%- projectPackageName %>",
3+
"version": "0.0.0-development",
34
"description": "<%- projectOverview %>",
4-
"license": "MIT",
5-
"author": "<%- npmAuthor %>",
65
"homepage": "<%- gitHubRepoUrl %>",
6+
"bugs": {
7+
"url": "<%- gitHubRepoUrl %>/issues"
8+
},
79
"repository": {
810
"type": "git",
911
"url": "<%- gitHubRepoUrl %>.git"
1012
},
11-
"bugs": {
12-
"url": "<%- gitHubRepoUrl %>/issues"
13-
},
14-
"version": "0.0.0-development",
13+
"license": "MIT",
14+
"author": "<%- npmAuthor %>",
1515
"main": "dist/<%- projectPackageName %>.js",
1616
"scripts": {
17-
"pre-commit": "lint-staged",
1817
"build": "run-p --print-label build-src build-dts",
1918
"build--watch": "onchange 'src/**/*' --initial --kill --delay 1000 -- npm run build",
2019
"build-dts": "tsc --emitDeclarationOnly",
@@ -28,12 +27,13 @@
2827
"format-doctoc": "doctoc --maxlevel 3 --notitle ./README.md ./DEVELOPING.md",
2928
"format-eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx --fix ./ >/dev/null 2>&1 || true",
3029
"format-imports": "import-sort --write '**/*.{js,jsx,ts,tsx}'",
31-
"format-package-json": "prettier-package-json --write",
30+
"format-package-json": "sort-package-json",
3231
"format-prettier": "prettier --write '**/*.{css,gql,graphql,html,js,jsx,json,less,md,mdx,scss,ts,tsx,vue,yaml,yml}' '.editorconfig' 'LICENSE'",
3332
"lint": "run-p lint-eslint lint-markdown",
3433
"lint--watch": "onchange 'src/**/*' --initial --kill --delay 1000 -- npm run lint",
3534
"lint-eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./",
3635
"lint-markdown": "markdownlint --ignore coverage --ignore dist --ignore node_modules '**/*.md' '.**/**/*.md'",
36+
"pre-commit": "lint-staged",
3737
"prepublish": "rimraf dist && npm run build",
3838
"start": "node --require dotenv/config dist/<%- projectPackageName %>.js",
3939
"start--dev": "NODE_ENV=development npm run start",
@@ -83,8 +83,8 @@
8383
"npm-run-all": "^4.1.5",
8484
"onchange": "^5.2.0",
8585
"prettier": "^1.16.2",
86-
"prettier-package-json": "^2.1.0",
8786
"rimraf": "^2.6.3",
87+
"sort-package-json": "^1.22.1",
8888
"typescript": "^3.4.1"
8989
}
9090
}

0 commit comments

Comments
 (0)