@@ -35,6 +35,7 @@ class NewCommand extends Command
3535 public $ starterKitLicense ;
3636 public $ local ;
3737 public $ withConfig ;
38+ public $ withoutDependencies ;
3839 public $ force ;
3940 public $ v2 ;
4041 public $ baseInstallSuccessful ;
@@ -56,6 +57,7 @@ protected function configure()
5657 ->addOption ('license ' , null , InputOption::VALUE_OPTIONAL , 'Optionally provide explicit starter kit license ' )
5758 ->addOption ('local ' , null , InputOption::VALUE_NONE , 'Optionally install from local repo configured in composer config.json ' )
5859 ->addOption ('with-config ' , null , InputOption::VALUE_NONE , 'Optionally copy starter-kit.yaml config for local development ' )
60+ ->addOption ('without-dependencies ' , null , InputOption::VALUE_NONE , 'Optionally install starter kit without dependencies ' )
5961 ->addOption ('v2 ' , null , InputOption::VALUE_NONE , 'Create a legacy Statamic v2 application (not recommended) ' )
6062 ->addOption ('force ' , 'f ' , InputOption::VALUE_NONE , 'Force install even if the directory already exists ' );
6163 }
@@ -162,6 +164,7 @@ protected function processArguments()
162164 $ this ->starterKitLicense = $ this ->input ->getOption ('license ' );
163165 $ this ->local = $ this ->input ->getOption ('local ' );
164166 $ this ->withConfig = $ this ->input ->getOption ('with-config ' );
167+ $ this ->withoutDependencies = $ this ->input ->getOption ('without-dependencies ' );
165168
166169 $ this ->force = $ this ->input ->getOption ('force ' );
167170
@@ -206,6 +209,10 @@ protected function validateArguments()
206209 throw new RuntimeException ('Starter kit is required when using `--with-config` option! ' );
207210 }
208211
212+ if (! $ this ->starterKit && $ this ->withoutDependencies ) {
213+ throw new RuntimeException ('Starter kit is required when using `--without-dependencies` option! ' );
214+ }
215+
209216 return $ this ;
210217 }
211218
@@ -503,6 +510,10 @@ protected function installStarterKit()
503510 $ options [] = $ this ->starterKitLicense ;
504511 }
505512
513+ if ($ this ->withoutDependencies ) {
514+ $ options [] = '--without-dependencies ' ;
515+ }
516+
506517 $ statusCode = (new Please ($ this ->output ))
507518 ->cwd ($ this ->absolutePath )
508519 ->run ('starter-kit:install ' , $ this ->starterKit , ...$ options );
0 commit comments