You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If this issue is still available, I think I could open a PR.
However, I'm not sure if I understand correctly that you suggest we should keep the dev script, too? Wouldn't it be weird if a newly generated package.json contained two scripts for the same command?
When I saw this issue, I thought about the following steps:
rename the dev script to start,
keep the current test:unit and test:e2e scripts if they are generated,
generate a new test script that either executes
test:unit if only unit tests are generated (vitest, cypress-ct or nightwatch-ct)
test:e2e if only E2E tests are generated (cypress, nightwatch or playwright)
both test:unit and test:e2e if unit AND E2E tests are generated
I was thinking that it would be better to keep the existing ones to avoid all the tooling/docs/blog posts/books to reference commands that no longer exist.
So I would:
add start along dev
keep the current test:unit and test:e2e scripts if they are generated
add test as an alias of test:unit, except if only e2e tests are generated, and in that case, as an alias of test:e2e
Activity
cexbrayat commentedon Nov 10, 2023
@aentwist Thanks for the suggestion
Maybe we could add
npm start
as an alias fornpm run dev
andnpm test
as an alias fornpm run test:unit
.This is what Angular CLI does for example.
Would you like to try and open a PR?
szgabsz91 commentedon Nov 18, 2023
Hi @cexbrayat,
If this issue is still available, I think I could open a PR.
However, I'm not sure if I understand correctly that you suggest we should keep the dev script, too? Wouldn't it be weird if a newly generated package.json contained two scripts for the same command?
When I saw this issue, I thought about the following steps:
dev
script tostart
,test:unit
andtest:e2e
scripts if they are generated,test
script that either executestest:unit
if only unit tests are generated (vitest, cypress-ct or nightwatch-ct)test:e2e
if only E2E tests are generated (cypress, nightwatch or playwright)test:unit
andtest:e2e
if unit AND E2E tests are generatedWhat do you think?
cexbrayat commentedon Nov 20, 2023
I was thinking that it would be better to keep the existing ones to avoid all the tooling/docs/blog posts/books to reference commands that no longer exist.
So I would:
start
alongdev
test:unit
andtest:e2e
scripts if they are generatedtest
as an alias oftest:unit
, except if only e2e tests are generated, and in that case, as an alias oftest:e2e
szgabsz91 commentedon Nov 20, 2023
OK, it's clear now. :) Then I'll take a look into it and open a PR soon, adding you as the reviewer if that's OK.
feat: generate start and test NPM scripts (vuejs#303)
feat: generate start and test NPM scripts (vuejs#303)
feat: generate start and test NPM scripts (vuejs#303)
feat: add the dev and test scripts to the template files (vuejs#303)
feat: generate start and test NPM scripts (vuejs#303)
feat: generate start and test NPM scripts (vuejs#303)
feat: generate start and test NPM scripts (vuejs#303)
evandrofgarcia commentedon Jun 20, 2024
I don’t receive