support creation of package.json
#698
HKhademian
started this conversation in
Ideas
Replies: 1 comment
-
The command to add a dependency is |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently when I run
bun i struktjs
in an empty folder, it creates an error :error: MissingPackageJSON bun could not find a package.json file.
Which means, it requires to create
package.json
file, before any package installs.To generate that file, we must use pnpm, npm, or yarn.
Another way is to use
bun create blank .
which generates a bootstrap project structure.In my taste is not a good match for the problem.
But why not bun provides a simple way, like
bun init
, similar tobun create
and pipe this command (likebun create
) internally to those PMs.ALSO Bun clams that Bun's a package manager, so like others it has to provide a way to init basic PM requirements.
I suggest to add
bun init [optional template from create] <path>
command.If both args provided, just use
bun create
subcommand.When no template provided (maybe an arg provided as path), it just inits
package.json
(maybetsconfig.json
)and when no path provided (no args), it uses current directory for above.
Beta Was this translation helpful? Give feedback.
All reactions