Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da7e055d77 | ||
|
|
bee2e54b87 | ||
|
|
1b179f55d1 |
60
README.rst
60
README.rst
@@ -3,22 +3,58 @@
|
||||
frontend-app-profile
|
||||
====================
|
||||
|
||||
Please tag **@edx/arch-fed** on any PRs or issues.
|
||||
This is a micro-frontend application responsible for the display and updating of user profiles. Please tag **@edx/arch-fed** on any PRs or issues.
|
||||
|
||||
Introduction
|
||||
------------
|
||||
When a user views their own profile, they're given fields to edit their full name, location, primary spoken language, education, social links, and bio. Each field also has a dropdown to select the visibility of that field - i.e., whether it can be viewed by other learners.
|
||||
|
||||
React app for user account management.
|
||||
When a user views someone else's profile, they see all those fields that that user set as public.
|
||||
|
||||
Important Note
|
||||
--------------
|
||||
----------
|
||||
|
||||
The production Webpack configuration for this repo uses `Purgecss <https://www.purgecss.com/>`_
|
||||
to remove unused CSS from the production css file. In webpack/webpack.prod.config.js the Purgecss
|
||||
plugin is configured to scan directories to determine what css selectors should remain. Currently
|
||||
the src/ directory is scanned along with all @edx/frontend-component* node modules and paragon.
|
||||
If you add and use a component in this repo that relies on HTML classes or ids for styling you
|
||||
must add it to the Purgecss configuration or it will be unstyled in the production build.
|
||||
Development
|
||||
-----------
|
||||
|
||||
Start Devstack
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
To use this application `devstack <https://github.com/edx/devstack>`__ must be running and you must be logged into it.
|
||||
|
||||
- Start devstack
|
||||
- Log in (http://localhost:18000/login)
|
||||
|
||||
Start the development server
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
In this project, install requirements and start the development server by running:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
npm install
|
||||
npm start # The server will run on port 1995
|
||||
|
||||
Once the dev server is up visit http://localhost:1995/u/staff.
|
||||
|
||||
----------
|
||||
|
||||
Configuration and Deployment
|
||||
----------------------------
|
||||
|
||||
This MFE is configured via node environment variables supplied at build time. See the .env file for the list of required environment variables. Example build syntax with a single environment variable:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
NODE_ENV=production ACCESS_TOKEN_COOKIE_NAME='edx-jwt-cookie-header-payload' npm run build
|
||||
|
||||
|
||||
For more information see the document: `Micro-frontend applications in Open
|
||||
edX <https://edx.readthedocs.io/projects/edx-developer-docs/en/latest/micro-frontends-in-open-edx.html>`__.
|
||||
|
||||
----------
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
The production Webpack configuration for this repo uses `Purgecss <https://www.purgecss.com/>`__ to remove unused CSS from the production css file. In ``webpack.prod.config.js`` the Purgecss plugin is configured to scan directories to determine what css selectors should remain. Currently the src/ directory is scanned along with all ``@edx/frontend-component*`` node modules and ``@edx/paragon``. **If you add and use a component in this repo that relies on HTML classes or ids for styling you must add it to the Purgecss configuration or it will be unstyled in the production build.**
|
||||
|
||||
.. |Build Status| image:: https://api.travis-ci.org/edx/frontend-app-profile.svg?branch=master
|
||||
:target: https://travis-ci.org/edx/frontend-app-profile
|
||||
|
||||
6
package-lock.json
generated
6
package-lock.json
generated
@@ -1029,9 +1029,9 @@
|
||||
}
|
||||
},
|
||||
"@edx/frontend-base": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@edx/frontend-base/-/frontend-base-4.0.1.tgz",
|
||||
"integrity": "sha512-IEyrorssh3uwRqXYmr7UFVtiz5MtpmnmysA9faCvi2KL4QVP+S9LQYv/48AFmTzNF3gqhO8kRT69YsawX4bdiA==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@edx/frontend-base/-/frontend-base-4.1.0.tgz",
|
||||
"integrity": "sha512-jGHCsQ4um6sWrh3L0ZJm+tBmmtGWefS1ULR9PNi6sDrXgKa1gceBg2W/uYzez0glMtS7HRn5zJ1kRpJHbDW7aA==",
|
||||
"requires": {
|
||||
"babel-polyfill": "6.26.0",
|
||||
"history": "4.9.0",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"dependencies": {
|
||||
"@edx/frontend-analytics": "3.0.0",
|
||||
"@edx/frontend-auth": "7.0.1",
|
||||
"@edx/frontend-base": "4.0.1",
|
||||
"@edx/frontend-base": "4.1.0",
|
||||
"@edx/frontend-component-footer": "9.0.0",
|
||||
"@edx/frontend-component-header": "1.1.4",
|
||||
"@edx/frontend-i18n": "3.0.2",
|
||||
|
||||
Reference in New Issue
Block a user