You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.
How would one go about publishing a compiled machine w/ generated types to npm (ie: can be consumed by js or ts)?
I see that there's an --outDir parameter but not obvious how to me how to use this as part of a publish script. The consumer of the package might also have machines (w/ generated types) as well. Basically, curious what the workflow is if you've got your machines distributed across multiple packages.
The text was updated successfully, but these errors were encountered:
I think this use case was never thought of. In theory, it could work if you set up postinstall script for your package and let it generate types there.
But it will be a problem in case of multiple packages generating this since all will be writing to @xstate/compiled. You would need to utilize --outDir to have a different output directory per package and import from that within the package instead of @xstate/compiled.
How would one go about publishing a compiled machine w/ generated types to npm (ie: can be consumed by js or ts)?
I see that there's an
--outDir
parameter but not obvious how to me how to use this as part of a publish script. The consumer of the package might also have machines (w/ generated types) as well. Basically, curious what the workflow is if you've got your machines distributed across multiple packages.The text was updated successfully, but these errors were encountered: