-
Notifications
You must be signed in to change notification settings - Fork 108
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
Proposal: introduce Wireit plugins #888
Comments
Thanks @kwangure. How would you feel about a tool that automatically maintained your wireit config by synchronizing it with your tsconfig, rather than being a plugin that runs every time wireit does? |
It might be an acceptable compromise if it helps keep Wireit simpler. That said, I'd probably add said tool as a Wireit command...and make it a dependency of every |
So, I could do as proprosed and create a bash or Node script which updates the
Basically, developers would have to run the A plugin system would give us the ability to simplify repetitive tasks by allowing them to be shared across packages and repositories. I have to put the same scripts across some 30+ packages in this mono-repo and that is difficult to maintain. |
what if instead of plugins (which tend to be a fragile part of any ecosystem) wireit publishes a public API. For example I know it doesn't ship the type definition files at the moment. A published API would make experiments like wireit-visualizer pretty straight forward and then folks could build on TOP of wireit rather than having code run through it. Even better if this api provided a way to update the config for your different commands. Then you could just run these separate tools that use the internals. Keeps the mess out of the core |
One huge limitation to Wireit currently is configuring input and output files. It's pretty easy for glob patterns of file inputs and outputs and the actual tool configuration to get out of sync. It's also not uncommon slightly to over include or under include file inputs and outputs. And when you fix a misconfiguration in one package, you may not notice it or remember to do it in another.
The fortunate bit is TypeScript knows what files it processes and where it puts them based on my configuration, so does ES Lint and Rollup...you get the picture. It would be handy if you could optionally use Wireit plugins that read that your tool configuration and configure
files
andoutputs
so that you don't have to. They could also configure other reasonable defaults. For example, TypeScript could default to only clean if files are deleted when inincremental
mode.This could also improve fingerprinting for commands by not ignoring caches when the repo-wide lock file changes. An ES Lint plugin could re-run only if the exact version of eslint or it's plugins changes...rather anything in the lock file being updated.
The text was updated successfully, but these errors were encountered: