pfgithub / scpl

text language for writing ios shortcuts faster
https://scpl.dev
MIT License
243 stars 19 forks source link

Separate CLI into its own package #38

Closed haykam821 closed 5 years ago

haykam821 commented 5 years ago

Both yargs and chalk are only used for the CLI, but in some cases I am only using the Node.js API. Personally, I think it would be better to split this into a scpl-cli package and link between the two.

pfgithub commented 5 years ago

Would you have to do a seperate npm i -g scpl-cli to get the scpl command or is there a way to include it in the scpl package when installed globally?

haykam821 commented 5 years ago

Running npm i -g scpl-cli scpl would dedupe the packages, but npm i -g scpl-cli wouldn't directly include scpl. However, I think that's better because I think people will use one or the other.

haykam821 commented 5 years ago

Here is a visualization of the ScPL and ScPL CLI dependencies (using this tool):

ScPL dependency visualization

pfgithub commented 5 years ago

I didn't realise yargs was that big, I don't even use any real features from it and could probably be using minimist instead. The cli package is now scpl-cli and the scpl package is only for scpl itself.

https://github.com/pfgithub/scpl-cli https://www.npmjs.com/package/scpl-cli