1.1.26 • Published 2 months ago

sort-package-json-scripts v1.1.26

Weekly downloads
16
License
ISC
Repository
github
Last release
2 months ago

README.md

a better sort package.json scripts, by default is follow npm lifecycle scripts

install

yarn add sort-package-json-scripts
yarn-tool add sort-package-json-scripts
import sortPackageJsonScripts from 'sort-package-json-scripts';

let ret = sortPackageJsonScripts({

	"lint": "npx eslint *.ts",

	"npm:publish": "npm publish",

	"prepublish:lockfile": "npx sync-lockfile .",
	"tsc:esm": "tsc -p tsconfig.esm.json",
	"ncu": "npx yarn-tool ncu -u",
	"sort-package-json": "npx yarn-tool sort",
	"test": "jest --coverage",
	"coverage": "npx nyc yarn run test",
	"test:mocha": "npx mocha --require ts-node/register \"!(node_modules)/*.{test,spec}.{ts,tsx}\"",
	"tsc:default": "tsc -p tsconfig.json",

	"prepublishOnly": "yarn run ncu && yarn run sort-package-json && yarn run test",

	"postpublish_": "git commit -m \"chore(release): publish\" .",
})

console.log(ret)
/*
{
	coverage: 'npx nyc yarn run test',
	lint: 'npx eslint *.ts',
	test: 'jest --coverage',
	'test:mocha': 'npx mocha --require ts-node/register "!(node_modules)/*.{test,spec}.{ts,tsx}"',
	'npm:publish': 'npm publish',
	'prepublish:lockfile': 'npx sync-lockfile .',
	prepublishOnly: 'yarn run ncu && yarn run sort-package-json && yarn run test',
	postpublish_: 'git commit -m "chore(release): publish" .',
	ncu: 'npx yarn-tool ncu -u',
	'sort-package-json': 'npx yarn-tool sort',
	'tsc:default': 'tsc -p tsconfig.json',
	'tsc:esm': 'tsc -p tsconfig.esm.json'
}
 */
1.1.26

2 months ago

1.1.25

1 year ago

1.1.23

2 years ago

1.1.24

1 year ago

1.1.16

2 years ago

1.1.19

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.22

2 years ago

1.1.21

2 years ago

1.1.20

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.6

3 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.0.12

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago