feat: Add package type selection for CLI or Framework#8
feat: Add package type selection for CLI or Framework#8SinghCod3r wants to merge 1 commit intoMr-emeka:mainfrom
Conversation
|
Hello @SinghCod3r 👋, thanks for this PR — the inclusion of the CLI / Framework option looks great. However, this PR should only introduce that feature. I’d like us to retain the existing argument structure as it is, so we don’t break consistency with other commands. Could you please revert the argument changes and keep the focus only on the new option? |
|
Hello @Mr-emeka, Thank you for the review and the clear feedback! I've updated the pull request as you requested. The unrelated argument changes have been removed, and the PR now contains a single, clean commit focused only on the new package type selection feature. It should be ready for another look. Thanks again! |
| if (args.length === 0 || args.includes("--help") || args.includes("-h")) { | ||
| printHelp(); | ||
| process.exit(0); | ||
| #!/usr/-bin/env node |
|
Hello @SinghCod3r , thanks a lot for your effort here 🙏 However, I think this PR introduces too many unnecessary structural changes.
The existing flow ( We don’t need to switch to Inquirer prompts or modify the project structure logic ( Can you please rework this PR to:
|
Closes #6
Description
This pull request introduces a new feature that allows users to select the type of package they want to create: either a standard Framework/Library or a CLI tool.
This enhancement makes the tool more versatile and streamlines the setup process for command-line applications.
Changes Implemented
listprompt has been added toindex.tsthat asks the user to choose the package type.package.jsonConfiguration:binfield is automatically added to the generatedpackage.json. This field points to the compiled output (dist/index.js), making the package executable.#!/usr/bin/env nodeis prepended to thesrc/index.tsfile, which is necessary for it to run as a command-line script.How to Test
package.jsonfile should contain abinfield.src/index.tsfile should start with#!/usr/bin/env node.