Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate CLI API of the JS API #153

Open
isuvorov opened this issue Nov 27, 2023 · 1 comment
Open

Separate CLI API of the JS API #153

isuvorov opened this issue Nov 27, 2023 · 1 comment

Comments

@isuvorov
Copy link

Hello everyone, thank you for such a useful package!

Have you thought about separating the CLI API (handleOptions) of the JS API (run function content)?
And makes package.json exports.

I'll explain the motivation:
Right now, I'm using clean-publish in my CLI tools with a call to process.spawn and passing a bunch of arguments, and in monorepos with 50+ packages, such spawn becomes a liitle stuck.

I posted a draft of my thoughts here:
isuvorov@16477fc

I've solved my task, but maybe this will also be useful for you.
I can do this more neatly, write typings, add usage examples in the doc and makes PR.
The only question is, do you need such functionality in principle?


Всем привет, спасибо за такой полезный пакет!

А вы не думали над тем, чтобы отделить CLI API (handleOptions) от самой реализации JS API cleanPublish (в функциии run)?
И раздать его в package.json exports;

Поясню мотивацию:
Сейчас я использую clean-publish в своих CLI инструментах вызова process.spawn и передаю туда с кучей аргументов, и в монорепах с 50+ пакетами такой вызов становится ощутимый.

Драфт моих мыслей выложил тут:
isuvorov@16477fc

Свою задачу я решил, но может вам тоже будет это полезно.
Я могу сделать это более аккуратно, прописать тайпинги, добавить примеры использования в доку и сделать PR.
Вопрос только, нужен ли вам впринципи такой функционал?

@ai
Copy link
Collaborator

ai commented Nov 27, 2023

Sure! Create PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants