Skip to content

Commit

Permalink
Use npm run for better compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vilicvane committed Feb 3, 2024
2 parents 0fa9222 + 5981744 commit 2aa1661
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion general/src/composables/package.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default composable<ResolvedOptions>(
'3': SCRIPT_3_DICT[packageManager],
lint: 'eslint --no-error-on-unmatched-pattern --report-unused-disable-directives .',
'lint-prettier': 'prettier --check .',
test: `${packageManager} lint-prettier && ${packageManager} lint`,
test: 'npm run lint-prettier && npm run lint',
};

for (const {name, alias} of packagesSortedByName) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"build": "rimraf --glob */bld && tsc --build",
"lint": "eslint --no-error-on-unmatched-pattern --report-unused-disable-directives . && run-in-every eslint-project --parallel --echo -- eslint --no-error-on-unmatched-pattern --report-unused-disable-directives .",
"lint-prettier": "prettier --check .",
"test": "yarn lint-prettier && yarn build && yarn lint"
"test": "npm run lint-prettier && npm run build && npm run lint"
},
"dependencies": {
"@magicspace/core": "^0.3.6",
Expand Down
7 changes: 2 additions & 5 deletions typescript/src/composables/package.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default composable<ResolvedOptions>(
scripts = extendObjectProperties(
scripts,
{
test: extendPackageScript(scripts.test, `${packageManager} build`, {
test: extendPackageScript(scripts.test, 'npm run build', {
after: '*lint-prettier*',
}),
},
Expand All @@ -135,10 +135,7 @@ export default composable<ResolvedOptions>(
{
'bare-test':
'cross-env NODE_OPTIONS=--experimental-vm-modules jest',
test: extendPackageScript(
scripts.test,
`${packageManager} bare-test`,
),
test: extendPackageScript(scripts.test, 'npm run bare-test'),
},
{
before: 'test',
Expand Down

0 comments on commit 2aa1661

Please sign in to comment.