mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
feat(init): add --npm flag to initialize npm projects (#26896)
This commit adds support for `deno init --npm <package>`. Running this will actually call to `npm:create-<package>` package that is equivalent to running `npm create <package>`. User will be prompted if they want to allow all permissions and lifecycle scripts to be executed. Closes https://github.com/denoland/deno/issues/26461 --------- Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
This commit is contained in:
parent
f0b245c8ee
commit
d17f4590a2
6 changed files with 191 additions and 12 deletions
|
@ -144,9 +144,7 @@ async fn run_subcommand(flags: Arc<Flags>) -> Result<i32, AnyError> {
|
|||
}
|
||||
DenoSubcommand::Init(init_flags) => {
|
||||
spawn_subcommand(async {
|
||||
// make compiler happy since init_project is sync
|
||||
tokio::task::yield_now().await;
|
||||
tools::init::init_project(init_flags)
|
||||
tools::init::init_project(init_flags).await
|
||||
})
|
||||
}
|
||||
DenoSubcommand::Info(info_flags) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue