@@ -18,7 +18,6 @@ import getCommand from './utils/getCommand'
1818import getLanguage from './utils/getLanguage'
1919import renderEslint from './utils/renderEslint'
2020import { FILES_TO_FILTER } from './utils/filterList'
21- import addNpmScript from './utils/addNpmScript'
2221
2322function isValidPackageName ( projectName ) {
2423 return / ^ (?: @ [ a - z 0 - 9 - * ~ ] [ a -z 0 -9 -* ._ ~ ] * \/ ) ? [ a - z 0 - 9 - ~ ] [ a - z 0 - 9 - ._ ~ ] * $ / . test ( projectName )
@@ -349,24 +348,24 @@ async function init() {
349348 if ( needsPinia ) {
350349 render ( 'config/pinia' )
351350 }
352- if ( needsVitest ) {
353- render ( 'config/vitest' )
354- }
355351 if ( needsCypress ) {
356352 render ( 'config/cypress' )
357353 }
358- if ( needsCypressCT ) {
359- render ( 'config/cypress-ct' )
360- }
361354 if ( needsNightwatch ) {
362355 render ( 'config/nightwatch' )
363356 }
364- if ( needsNightwatchCT ) {
365- render ( 'config/nightwatch-ct' )
366- }
367357 if ( needsPlaywright ) {
368358 render ( 'config/playwright' )
369359 }
360+ if ( needsVitest ) {
361+ render ( 'config/vitest' )
362+ }
363+ if ( needsCypressCT ) {
364+ render ( 'config/cypress-ct' )
365+ }
366+ if ( needsNightwatchCT ) {
367+ render ( 'config/nightwatch-ct' )
368+ }
370369 if ( needsTypeScript ) {
371370 render ( 'config/typescript' )
372371
@@ -492,20 +491,6 @@ async function init() {
492491 const userAgent = process . env . npm_config_user_agent ?? ''
493492 const packageManager = / p n p m / . test ( userAgent ) ? 'pnpm' : / y a r n / . test ( userAgent ) ? 'yarn' : 'npm'
494493
495- // Extend the package.json with the test script
496- const packageJsonPath = path . resolve ( root , 'package.json' )
497- addNpmScript ( 'start' , packageManager , 'dev' , packageJsonPath )
498- if (
499- ( needsCypress || needsNightwatch || needsPlaywright ) &&
500- ! needsVitest &&
501- ! needsCypressCT &&
502- ! needsNightwatchCT
503- ) {
504- addNpmScript ( 'test' , packageManager , 'test:e2e' , packageJsonPath )
505- } else if ( needsVitest || needsCypressCT || needsNightwatchCT ) {
506- addNpmScript ( 'test' , packageManager , 'test:unit' , packageJsonPath )
507- }
508-
509494 // README generation
510495 fs . writeFileSync (
511496 path . resolve ( root , 'README.md' ) ,
0 commit comments