Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

[Plugin Request] CLI program in separate file #72

Open
filips123 opened this issue Aug 1, 2019 · 2 comments
Open

[Plugin Request] CLI program in separate file #72

filips123 opened this issue Aug 1, 2019 · 2 comments

Comments

@filips123
Copy link
Contributor

filips123 commented Aug 1, 2019

Can you make a plugin for CLI programs that are in separate files (not like @pika/plugin-simple-bin which only adds wrapper)?

So, in the source package directory, there would default index.js and arbitrary file for CLI program (like console.js). That file would then import Something from './index.js' and use Something in CLI. In the source package.json, there should be pipeline like ["@pika/plugin-simple-bin", {"entrypoints": {"my-cli": "src/console.js", "my-cli-2": "src/console2.js"}].

This would build all console files to Node.js format and add them to bin section of package.json.

  1. Copy and build all console files for Node.js
  2. Maybe add v8-compile-cache
  3. Add files to bin of package.json
@FredKSchott
Copy link
Owner

For sure! If there's enough interest this could make sense as an official plugin, or at the very least it sounds like a good opportunity for a community-created plugin.

@filips123
Copy link
Contributor Author

@FredKSchott It should probably be an official plugin. Maybe this could just be the addition in existing @pika/plugin-simple-bin.

@FredKSchott FredKSchott changed the title Plugin for CLI program in separate file [Plugin Request] CLI program in separate file Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants