-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(init): add --npm flag to initialize npm projects #26896
Conversation
$ deno init npm:preact
error: Could not find a matching package for 'npm:create-preact' in the node_modules directory. Ensure you have all your JSR and npm dependencies listed in your deno.json or package.json, then run `deno install`. Alternatively, turn on auto-install by specifying `"nodeModulesDir": "auto"` in your deno.json file. EDIT: Ignore what I wrote. I had a |
Thanks, I know what the problem is, will fix it tonight. |
032e324
to
8bdffdb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Co-authored-by: David Sherret <dsherret@users.noreply.github.com> Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit adds support for
deno init --npm <package>
.Running this will actually call to
npm:create-<package>
package thatis equivalent to running
npm create <package>
.User will be prompted if they want to allow all permissions and lifecycle scripts
to be executed. It was discussed internally if we should accept permission flags here
but it will be really cumbersome and in most cases these creation scripts need to do
a lot of crazy stuff including reaching out to networks, reading and writing to file system,
reading env vars and spawning subprocesses.
Closes #26461