Skip to content

Commit 4c8b4f1

Browse files
authoredMar 4, 2024
feat: add example apps (#33)
* fix: wrap getConfig in usePluginSlot * fix: convert frontend build and paragon to use @openedx scope * fix: update frontend-platform
1 parent d656ca9 commit 4c8b4f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+40219
-7089
lines changed
 

‎.eslintrc.js

+17-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
// eslint-disable-next-line import/no-extraneous-dependencies
2-
const { createConfig } = require('@edx/frontend-build');
2+
const { createConfig } = require('@openedx/frontend-build');
33

4-
module.exports = createConfig('eslint');
4+
const config = createConfig('eslint');
5+
6+
config.rules = {
7+
'import/no-unresolved': ['error', {
8+
ignore: ['@edx/frontend-plugin-framework/example*'],
9+
}],
10+
'import/no-extraneous-dependencies': ['error', {
11+
devDependencies: true,
12+
}],
13+
};
14+
15+
config.ignorePatterns = [
16+
'example*',
17+
];
18+
19+
module.exports = config;

‎README.rst

+17-1
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,27 @@ for a component that lives in another MFE (the 'Child MFE') to be plugged into a
2626

2727
Getting Started
2828
===============
29-
1. Add Library Dependency
29+
Add Library Dependency
3030
-------------------------
3131

3232
Add ``@edx/frontend-plugin-framework`` to the ``package.json`` of both Host and Child MFEs.
3333

34+
Using the Example Apps
35+
----------------------
36+
37+
1. Run ``npm install`` in the root directory.
38+
39+
2. In separate terminals, run ``npm install`` inside both example app directories (``/example`` and ``/example-plugin-app``).
40+
41+
3. Run ``npm run start`` in both directories.
42+
43+
Alternatively, once the packages are installed in both apps, you can run the apps from the root directory.
44+
45+
1. ``npm run start`` runs the host MFE (``example``)
46+
47+
2. ``npm run start:plugins`` runs the child MFE (``example-plugin-app``)
48+
49+
3450
Micro-frontend configuration document (JS)
3551
------------------------------------------
3652

0 commit comments

Comments
 (0)
Please sign in to comment.