The Morningstar Design System repository consists of three directories—library, doc-site and sandbox.
The repository runs using Node JS or nvm-windows. We recommend:
Use the doc-site
directory when publishing documentation to the MDS documentation website. doc-site
contains several sub-directories, but work will primarily be done in:
/doc-site/docs/
— Contains the documentation pages—for components, visual language, etc.—that are visible on the MDS site./doc-site/components/
— Contains the components we use to render our documentation, like Do/Don’t examples, reference tables, and navigation. These components are for internal MDS use only and are not included in our NPM library package.By default, the doc-site
directory will look to the latest released version of the MDS library from Morningstar’s NPM Nexus server. When doing consecutive work on both the doc-site
and the library
—for example, making an update to the Buttons component and adding new documentation to account for the change—it is necessary to, instead, point doc-site
to your local library
source code.
To point your local doc-site
environment to the local version of library:
doc-site
npm run link-local-library
in your terminalnpm start
from doc-site
and you will be referencing the source code files from your local version of the library
To point your local doc-site
environment back to NPM for the latest released version of the library:
doc-site
npm run unlink-local-library
in your terminalnpm start
from doc-site
and you will be referencing the source code files from latest NPM released version of the library
Command
|
Description
|
---|---|
|
Installs the node modules necessary to run the local environment, including the latest version of the MDS library. |
|
Builds the project and launches a local development server. |
|
Stops the server. |
|
Points |
|
Points |
doc-site
locally.Use the library
directory when building new components, adding constants and mixins, or creating tests. library
contains the source code for the components and styles shipped in the MDS NPM package, as well as the component AVR and unit testing suites.
/library/components/
— Contains the source code for the components included in the MDS NPM package./library/constants/
— Definition of library constants./library/styles/
— SCSS files containing all library mixins for typography, color, space, and more./library/test/
— Contains the AVR and unit testing suites. AVR test files are located in /library/test/visual
and unit test files are in /library/test/unit
.
Command
|
Description
|
---|---|
|
Installs the node modules necessary to run the local environment. |
|
Builds the project and launches a local development server. |
|
Runs unit tests. |
|
Stops the server. |
|
Runs AVR tests. |
|
Promotes the latest AVR test images. |
library
locally.Use sandbox
as a local playground to compose examples with the latest released version of the MDS library. You can see composed examples here.
You can compose MDS UI library components under the sandbox/includes
directory and sandbox/docs/sandbox/composed-test.njk
file. The composed examples can be viewed on http://localhost:3000/sandbox/composed-test.html
.
Command
|
Description
|
---|---|
|
Installs the node modules necessary to run the local environment. |
|
Builds the project and launches a local development server. |
|
Stops the server. |
|
Points |
|
Points |
sandbox
locally.