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
" Error: Please set the environment variable BASEAPP_FRONTEND_TEMPLATE_PATH in your shell startup (e.g., in ~/.bashrc or ~/.zshrc) before running this command.\n",
To develop all apps and packages, run the following command:
91
+
Our development mode is designed to provide immediate feedback as you work on our monorepo apps and packages. In dev mode, each package automatically watches for changes in its source files, rebuilds itself using a custom build process, and synchronizes its output (bundled code, type declarations, etc.) to the consumer app.
92
+
93
+
This ensures that any changes you make are quickly reflected in the running application without the need to manually rebuild or restart servers.
94
+
95
+
### What Happens in Dev Mode
96
+
97
+
Some of our packages—like `@baseapp-frontend/components` and `@baseapp-frontend/design-system`—have a multi-step build process. When you run:
92
98
93
99
```bash
94
100
pnpm dev
95
101
```
96
102
103
+
Each package in our monorepo enters a persistent watch mode.
104
+
105
+
For example, when running dev mode for `@baseapp-frontend/components`, you might see output similar to the following:
106
+
```bash
107
+
[@baseapp-frontend/components] Waiting for other packages to start... # wait for other dependencies to be build
108
+
[@baseapp-frontend/components] Starting build process... # start the build process
109
+
[@baseapp-frontend/components] Running Relay Compiler... # since this package uses relay, run the relay compiler
The dev mode is a powerful tool that makes live testing of changes very convenient by automatically rebuilding packages as you edit files.
128
+
129
+
However, note that for packages like `@baseapp-frontend/design-system` and `@baseapp-frontend/components`, the watch process can trigger multiple build tasks upon every file change.
130
+
131
+
This continuous rebuild may lead to increased memory consumption and CPU usage if you’re making a lot of simultaneous changes.
132
+
133
+
It is recommended to use this live mode only at appropriate times rather than throughout your entire development phase.
134
+
135
+
97
136
## **PNPM Catalog Overview**
98
137
99
138
This monorepo manages some dependencies using pnpm catalogs. As a rule of thumb, we often add dependencies to the catalogs that are reused across multiple packages, rather than arbitrarily adding dependencies to these lists. This approach ensures that shared dependencies are centrally managed and consistently applied across the codebase.
@@ -104,13 +143,10 @@ Make sure to keep [`@baseapp-frontend's catalog`](https://github.com/silverlogic
104
143
105
144
### **Remove Catalog Entries**:
106
145
107
-
Before using a package from GitHub, remove its catalog entry. This is necessary because pnpm doesn't handle catalogs well when using non-published versions. To remove the catalogs for the desired package, run the following command:
146
+
Before using a package from GitHub, remove its catalog entry. This is necessary because pnpm doesn't handle catalogs well when using non-published versions. To remove the catalogs for all packages, run the following command:
108
147
109
148
```bash
110
-
# will replace catalogs for utils and authentication packages
111
-
pnpm replace-catalogs utils authentication
112
-
113
-
# will replace catalogs for all packages
149
+
pnpm i # make sure the dependencies are installed
114
150
pnpm replace-catalogs
115
151
```
116
152
@@ -119,10 +155,7 @@ Make sure to keep [`@baseapp-frontend's catalog`](https://github.com/silverlogic
119
155
To restore the catalog entries to their original state, run the following command:
120
156
121
157
```bash
122
-
# will restore catalogs for utils and authentication packages
This package contains essential BaseApp modules such as `comments`, `notifications`, `messages` and `navigations`. It also includes Storybook, a tool for component documentation and visualization. To run the Storybook locally, navigate to the package folder and run the following command:
21
+
This package contains essential BaseApp modules such as `comments`, `notifications`, `messages` and `navigations`. It also includes Storybook, a tool for component documentation and visualization. To run the Storybook locally, run the following command:
0 commit comments