-
Notifications
You must be signed in to change notification settings - Fork 65
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
hosting multiple apps #67
Labels
discussion
Discussion topic
documentation
Improvements or additions to documentation
enhancement
New feature or request
medium priority
Comments
This was referenced Sep 1, 2020
Merged
threepointone
added a commit
that referenced
this issue
Sep 3, 2020
As prep for hosting multiple apps, this PR changes the commands from: ``` modular build modular start ``` to ``` modular build <path> modular start <path> ``` In the next PR, I'll change 'modular add' to ask a question to the user, which would then generate either an app, a widget, or a regular package. Combining the 2 PRs, we can then host multiple apps as described in #67, and possibly answer #37 too.
threepointone
added a commit
that referenced
this issue
Sep 3, 2020
As prep for hosting multiple apps, this PR changes the commands from: ``` modular build modular start ``` to ``` modular build <path> modular start <path> ``` In the next PR, I'll change 'modular add' to ask a question to the user, which would then generate either an app, a widget, or a regular package. Combining the 2 PRs, we can then host multiple apps as described in #67, and possibly answer #37 too.
threepointone
added a commit
that referenced
this issue
Sep 4, 2020
As prep for hosting multiple apps, this PR changes the commands from: ``` modular build modular start ``` to ``` modular build <path> modular start <path> ``` In the next PR, I'll change 'modular add' to ask a question to the user, which would then generate either an app, a widget, or a regular package. Combining the 2 PRs, we can then host multiple apps as described in #67, and possibly answer #37 too.
threepointone
added a commit
that referenced
this issue
Sep 4, 2020
* Let a user create different kinds of packages in a modular repo. This PR adds the ability for a user to add different types of packages to a modular repo. It does this in 4 commits: 1. `modular build` / `modular start` accept an argument, the name of the app to build/start. It changes the included scripts in package.json to reflect this; `modular build app` and `modular start app`. 2. Next, it relocates module-template-widget-typescript into modular-scripts as templates/widget. Further, it makes templates/package for simpler packages. This commit also cleans up builds after every run. 3. `Running modular add <name>` pops up a list of choices to select for the type of package to create; `app`, `widget` and `package`. For `widget` and `package`, it copies a folder from inside modular-scripts/templates into the desired directoy. 4. In the final commit, selecting `app` in the list creates a new create-react-app instance in the desired location. followup todo: Does `modular test` only run the tests in `packages/app`? We should verify that it runs all the tests in the repo (If it does, nothing else to do here.) addresses #67, #39
This has now landed and published, leaving open until we write docs for it. |
threepointone
added
documentation
Improvements or additions to documentation
enhancement
New feature or request
labels
Sep 6, 2020
This relates in some ways to the high-level 'loaders' issue. |
The main readme now documents the commands for making/running a new app, and our simplified docs don't need more detail than this (for now). Closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
discussion
Discussion topic
documentation
Improvements or additions to documentation
enhancement
New feature or request
medium priority
I was thinking of 'multiple apps' with modular. We already have a couple of usecases popping up, and I can imagine it's not really an edge case for most people. I'd think there are 3 'kinds' of scenarios/solutions:
The current solution is to use dynamic imports + React.lazy for every entry, and use a router to load them on different paths.
Separate apps, basically separate CRA instances. So you could have
packages/app1
andpackages/app2
be full fledged CRA generated repositories.modular build
should accept a entry input; e.g.modular build packages/app2
/public
boilerplate is annoying, could do better?We could have multiple entry points in the generated bundle. CRA currently assumes src/index.js; we could theoretically add more. So the command to build would be
modular build packages/app/src/index.js packages/app/src/docs.js ...
.It feels to me like a combination of options 1 and 2 is the right way to go about this, and we solve the cons (figure out a way to inline prefetches for a given entry, figure out incremental builds, etc.) Open to input.
The text was updated successfully, but these errors were encountered: