Describe the feature you'd like
--The init command does not verify whether a package.json already exists in the working directory. This can lead to confusion when running packship init in existing Node.js projects, or errors if the user hasn't initialized the project with npm init.
Where this feature should be added?
src/commands/init.ts
what should be done
--Before calling createPackage(), check for the existence of package.json in the current directory.
--If package.json is present:
Show a warning: “A Node.js project already exists in this directory. Do you want to proceed?”
--If it’s not present:
Show a message: “No package.json found. You may want to run npm init first.”
Describe the feature you'd like
--The init command does not verify whether a package.json already exists in the working directory. This can lead to confusion when running packship init in existing Node.js projects, or errors if the user hasn't initialized the project with npm init.
Where this feature should be added?
src/commands/init.ts
what should be done
--Before calling createPackage(), check for the existence of package.json in the current directory.
--If package.json is present:
Show a warning: “A Node.js project already exists in this directory. Do you want to proceed?”
--If it’s not present:
Show a message: “No package.json found. You may want to run npm init first.”