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

Programmatically use #34

Open
Kolobok12309 opened this issue May 12, 2022 · 3 comments
Open

Programmatically use #34

Kolobok12309 opened this issue May 12, 2022 · 3 comments
Labels
enhancement New feature or request pending

Comments

@Kolobok12309
Copy link

If i try import package import { buildModule } from '@nuxt/module-builder';, i get this error

No "exports" main defined in .../node_modules/@nuxt/module-builder/package.json

Can you add exports or main to package.json?

Copy link
Member

atinux commented May 23, 2022

What is your purpose of using it programmatically?

@Kolobok12309
Copy link
Author

We create library with multiple nuxt-modules, for this i create scripts for prebuild/build this modules.
Now i use exec from child_process

exec(`nuxt-module-build ${modulePath} --stub`)

@pi0
Copy link
Member

pi0 commented May 31, 2022

We are planning to work on a unified CLI toolkit. I think with that exposing a standard programmatic API would be easily possible! In the meantime, using exec (or execa) is probably the best!

@pi0 pi0 added enhancement New feature or request pending labels May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pending
Projects
None yet
Development

No branches or pull requests

3 participants