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

JavaScript API? #129

Open
coolov opened this issue Nov 4, 2021 · 1 comment
Open

JavaScript API? #129

coolov opened this issue Nov 4, 2021 · 1 comment

Comments

@coolov
Copy link

coolov commented Nov 4, 2021

Hey!

Thanks for an excellent tool!

Has there been any interest in creating a module api so that the tool can be more easily integrated into other toolchains, e.g.:

import babelWatch from 'babel-watch';

const watcher = babelWatch(src, { extensions: ['.js', '.ts'] };

// maybe some custom event api, that lets you access the build lifecycle
// e.g. watcher.on('restart')

// maybe some way to manually restart the build, e.g.
// watcher.restart();

Is this something that you think fits in the scope of this tool? And if you do, is it something that you need help with?

Similar APIs:
https://vitejs.dev/guide/api-javascript.html
https://webpack.js.org/configuration/dev-server/
https://www.snowpack.dev/reference/javascript-interface

@coolov coolov changed the title Module API? JavaScript API? Nov 4, 2021
@STRML
Copy link
Collaborator

STRML commented Nov 4, 2021

I think that's a great idea! That would be a good way to help testability. I could use help on it.

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