-
Notifications
You must be signed in to change notification settings - Fork 67
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
RFC: modular build
: take 2
#152
Comments
We'll need a way for workspaces to opt-out of this flow, since there will be packages that might not want to build in this manner. Which probably means another field in the modular config in the workspace's package.json. |
Work for this ongoing in https://github.com/jpmorganchase/modular/tree/build-2 |
What would the default be fore |
That sounds fair. |
I'm now of the opinion that we shouldn't have an Landed the build PR in #195. We're tracking affected builds in #147. So I'm closing this issue 🎉 |
For posterity's sake, you can emulate
|
Currently, we have a
build
command that given an app name, runsreact-scripts build
on it, and outputs the built assets intopackages/<name>/dist
. That's pretty good, and serves the original purpose ofmodular
, i.e, building apps.I'd proposed earlier that without any changes to our design, we can use modualr to build libraries too, making
modular
a general software development pattern. (Previous proposal - #49). This issue adds some more implementation details.modular build <name>
:should build the workspace named
<name>
. If it's an app, then it runsreact-scripts build
on it, nothing changes there, but it should move built assets to<root>/dist/<name>
.If it's a view or a regular package, then it should first run
yarn build
inside that workspace (delegating to any build command defined in its package.json), and then run a build script that generates a single esm file, a cjs file, and typings for that package. It then generates a .tgz of the package (with a modified package.son that points to these new assets), and moves it to<root>/dist/<name>.tgz
.modular build <name1>,<name2>,<name3>
: Like the above, but runs multiple builds at once.modular build --all
: Runs builds on all workspaces.modular build --changed
: Runs builds only on 'changed' workspaces, as defined by RFC: Incremental builds stage 1 - rebuilding affected packages/apps. #147.I'll send a PR for a base implementation of this very soon.
The text was updated successfully, but these errors were encountered: