Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: updated README file to reflect template changes #380

Merged
merged 19 commits into from
Oct 4, 2023
Merged
34 changes: 23 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
frontend-component-header
#########################

|Build Status| |Codecov| |npm_version| |npm_downloads| |license| |semantic-release|
|license| |Build Status| |Codecov| |npm_version| |npm_downloads| |semantic-release|

********
Overview
Purpose
********

A generic header for Open edX micro-frontend applications.

************
Requirements
Getting Started
************

Requirements
============

This component uses ``@edx/frontend-platform`` services such as i18n, analytics, configuration, and the ``AppContext`` React component, and expects that it has been loaded into a micro-frontend that has been properly initialized via ``@edx/frontend-platform``'s ``initialize`` function. `Please visit the frontend template application to see an example. <https://github.com/openedx/frontend-template-application/blob/master/src/index.jsx>`_

Environment Variables
=====================

Environment Variables
* ``LMS_BASE_URL`` - The URL of the LMS of your Open edX instance.
* ``LOGOUT_URL`` - The URL of the API endpoint which performs a user logout.
* ``LOGIN_URL`` - The URL of the login page where a user can sign into their account.
Expand All @@ -32,19 +34,24 @@ Environment Variables
menu items when truthy. This is intended to be used in micro-frontends like
frontend-app-authentication in which these menus are considered distractions from the user's task.

************
Installation
************
============

To install this header into your Open edX micro-frontend, run the following command in your MFE:

``npm i --save @edx/frontend-component-header``

This will make the component available to be imported into your application.

*****
Cloning and Startup
===================

1. Clone your new repo:

``git clone https://github.com/openedx/frontend-component-header.git``

Usage
*****
=====

This library has the following exports:

Expand All @@ -59,9 +66,9 @@ Examples
* `An example of SCSS file usage. <https://github.com/openedx/frontend-template-application/blob/3cd5485bf387b8c479baf6b02bf59e3061dc3465/src/index.scss#L8>`_


***********

Development
***********
===========

Install dependencies::

Expand All @@ -87,3 +94,8 @@ Build a production distribution::
:target: @edx/frontend-component-header
.. |semantic-release| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
:target: https://github.com/semantic-release/semantic-release

Reporting Security Issues
*************************

Please do not report security issues in public. Please email [email protected].