The intention behind this PR is to enable maintainers to rapidly iterate on the UIs locally. To this end, this PR makes these changes:
Refactor the file and folder structure of apps/ to mirror the output of running plop. This makes it easier to mentally map changes to this code to the corresponding changes in the output. It also enables the IDE to apply the .tsconfig in the root of each app to the app's code.
Add a new search app. I used this as my guinea pig and will continue to iterate on this app in subsequent PRs.
Add a dev:search script. Running npm run dev:search will kick off the dev process for the search app (details below). We'll have a dev script per app.
Dev process
Kick off the dev process by running:
npm run dev:search
This will:
Copy the contents of the apps/search/ directory to dev/search/, which is gitignored. If this directory already exists, it will be completely overwritten.
Copy the root-level .env file to dev/search/. This file is also gitignored. This file provides all of the process.env vars that configure the app.
Watch the apps/search/ directory for changes and sync them to dev/search/.
cd into dev/search/, install dependencies, and run npm run start. Output of these processes will log to the terminal.
For reviewers
The diff is pretty noisy, and I'm not sure how well I encapsulated changes in commits so reviewing the commit history might not be so great either. I think reviewing this locally will be the best way to get a sense of the changes.
I suggest:
Reviewing the changes to the contents of apps/.
Reviewing changes to the plop actions and prompts files.
Reviewing the scripts/ directory and testing out the dev process.
Overview
The intention behind this PR is to enable maintainers to rapidly iterate on the UIs locally. To this end, this PR makes these changes:
apps/
to mirror the output of runningplop
. This makes it easier to mentally map changes to this code to the corresponding changes in the output. It also enables the IDE to apply the.tsconfig
in the root of each app to the app's code.search
app. I used this as my guinea pig and will continue to iterate on this app in subsequent PRs.dev:search
script. Runningnpm run dev:search
will kick off the dev process for thesearch
app (details below). We'll have a dev script per app.Dev process
Kick off the dev process by running:
This will:
apps/search/
directory todev/search/
, which is gitignored. If this directory already exists, it will be completely overwritten..env
file todev/search/
. This file is also gitignored. This file provides all of theprocess.env
vars that configure the app.apps/search/
directory for changes and sync them todev/search/
.cd
intodev/search/
, install dependencies, and runnpm run start
. Output of these processes will log to the terminal.For reviewers
The diff is pretty noisy, and I'm not sure how well I encapsulated changes in commits so reviewing the commit history might not be so great either. I think reviewing this locally will be the best way to get a sense of the changes.
I suggest:
apps/
.scripts/
directory and testing out the dev process.