@openedx/frontend-base 1.0.0-alpha.10 → 1.0.0-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -67,6 +67,33 @@ npm run dev
|
|
|
67
67
|
|
|
68
68
|
The development site will be available at `http://apps.local.openedx.io:8080`.
|
|
69
69
|
|
|
70
|
+
### Developing an app and `frontend-base` concurrently
|
|
71
|
+
|
|
72
|
+
Concurrent development with `frontend-base` uses a tarball-based workflow rather than traditional local linking approaches. See [test-site/tools/autoinstall/README.md](./test-site/tools/autoinstall/README.md) for details.
|
|
73
|
+
|
|
74
|
+
#### In `frontend-base`
|
|
75
|
+
|
|
76
|
+
This watches for changes in `frontend-base` and rebuilds the packaged tarball on each change.
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
nvm use
|
|
80
|
+
npm ci
|
|
81
|
+
npm run dev:pack
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### In the consuming application
|
|
85
|
+
|
|
86
|
+
> [!NOTE]
|
|
87
|
+
> This assumes the consuming application has the same tooling as [test-site/tools/autoinstall/](./test-site/tools/autoinstall/)
|
|
88
|
+
|
|
89
|
+
This watches for changes to the generated .tgz, installs the updated package, and restarts the dev server.
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
nvm use
|
|
93
|
+
npm ci
|
|
94
|
+
npm run dev:autoinstall
|
|
95
|
+
```
|
|
96
|
+
|
|
70
97
|
## Migrating an MFE to `frontend-base`
|
|
71
98
|
|
|
72
99
|
See the [Frontend App Migration How To](./docs/how_tos/migrate-frontend-app.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openedx/frontend-base",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.12",
|
|
4
4
|
"description": "Build tools, setup and config for frontend apps",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"/types.ts"
|
|
15
15
|
],
|
|
16
16
|
"bin": {
|
|
17
|
-
"intl-imports.js": "tools/dist/cli/
|
|
17
|
+
"intl-imports.js": "tools/dist/cli/intl-imports.js",
|
|
18
18
|
"openedx": "tools/dist/cli/openedx.js",
|
|
19
|
-
"transifex-utils.js": "tools/dist/cli/
|
|
19
|
+
"transifex-utils.js": "tools/dist/cli/transifex-utils.js"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "make build",
|
|
@@ -26,7 +26,10 @@
|
|
|
26
26
|
"docs:watch": "nodemon -w runtime -w docs/template -w README.md -e js,jsx,ts,tsx --exec npm run docs",
|
|
27
27
|
"lint": "eslint .; npm run lint:tools; npm --prefix ./test-site run lint",
|
|
28
28
|
"lint:tools": "cd ./tools && eslint . && cd ..",
|
|
29
|
-
"test": "jest"
|
|
29
|
+
"test": "jest",
|
|
30
|
+
"pack:local": "mkdir -p pack && npm pack --silent --pack-destination pack >/dev/null && mv \"$(ls -t pack/*.tgz | head -n 1)\" pack/openedx-frontend-base.tgz",
|
|
31
|
+
"build:pack": "make build && npm run pack:local",
|
|
32
|
+
"dev:pack": "nodemon --config nodemon.pack.json"
|
|
30
33
|
},
|
|
31
34
|
"repository": {
|
|
32
35
|
"type": "git",
|