create-vue icon indicating copy to clipboard operation
create-vue copied to clipboard

fix: Correct the 'build' command in the package.json file.

Open mishengqiang opened this issue 2 years ago • 6 comments

The package.json file is located at template/config/typescript/package.json.

run-p type-check \"build-only {@}\" -- -> run-p type-check \"build-only -- {@}\" --

#393

mishengqiang avatar Nov 30 '23 03:11 mishengqiang

Ah, I didn't consider pnpm and yarn. After testing, yarn performs the best – it passes parameters as expected regardless of whether -- is added or not. npm requires an extra -- to pass parameters as expected. pnpm doesn't need an extra -- to pass parameters as expected.

image

The image below demonstrates when an extra '--' is added. image

mishengqiang avatar Nov 30 '23 11:11 mishengqiang

Yes, that's why I don't know if we should change the default or not, or maybe there is a way to make it work with all package managers?

cexbrayat avatar Nov 30 '23 13:11 cexbrayat

Yeah, I think this should be resolved in the upstream npm-run-all2 package instead. Before that, maybe we can add a note in the generated README?

haoqunjiang avatar Nov 30 '23 17:11 haoqunjiang

Yeah, I think this should be resolved in the upstream npm-run-all2 package instead. Before that, maybe we can add a note in the generated README?

I resolved it in the https://github.com/bcomnes/npm-run-all2/pull/143.

We can run run-p type-check \"build-only -- {@}\" -- on npm/yarn/pnpm when the PR is merged

ayu-exorcist avatar Jul 03 '24 14:07 ayu-exorcist

Yeah, I think this should be resolved in the upstream npm-run-all2 package instead. Before that, maybe we can add a note in the generated README?

I resolved it in the bcomnes/npm-run-all2#143.

We can run run-p type-check \"build-only -- {@}\" -- on npm/yarn/pnpm when the PR is merged

Already merged in npm-run-all2 v6.2.1

We can try to merge this PR now!

ayu-exorcist avatar Jul 04 '24 02:07 ayu-exorcist

Turns out this was a breaking change so I reverted. I need to consider this change a little bit more and at a minimum, put it out in a major release with notes on upgrading.

bcomnes avatar Jul 04 '24 03:07 bcomnes