Skip to content

Latest commit

 

History

History
92 lines (67 loc) · 2.64 KB

GETTING_STARTED.md

File metadata and controls

92 lines (67 loc) · 2.64 KB

Getting Started

Currently, this project is closed to any external contributions. Any pull request made against this project from external sources will likely be closed. If you would like to make changes to this project, please fork this project.

For internal developers, if you would like to contribute to this project, please review our contributing guide.

Cloning

In order to begin utilizing this project, it must be cloned locally. This can be done using multiple methods, but the preferred method would be to utilize git. Once git is installed and operational on your platform, navigate to the folder you would like this project to reside in and run the following command:

# External Developers
git clone [email protected]:{YOUR_FORK}/momentum-react-v2.git

# Internal Developers
git clone [email protected]:momentum-design/momentum-react-v2.git

This will download the latest version available via this project's GitHub repository for usage locally. Once the above command finishes its execution, navigate to that folder using the following command:

cd ./momentum-react-v2

Initializing

In order to execute any scripts associated with this project, the projects dependencies must be initialized using the following command:

yarn install

In case you get command not found: yarn, please run corepack enable before you try again yarn install

Building

In order to build this project for downstream projects, the following command must be used to compile the source code:

yarn build # building with yarn package manager

Consumption

In the case of npm or yarn, adding the following dependency to your project's package.json file will link this project to your project.

{
  /* ...other package definitions... */
  "dependencies": {
    /* ...other package dependencies... */
    "@momentum-ui/react-collaboration": "link:./path/to/this/project"
  }
}

Note: Since this package will collide with the original @momentum-ui's /react sub-module, you may need to alias this package seperately in your package.json.

Usage

Once the package is properly linked, the components can be imported for usage within your application:

/* ...other imports... */
import { Button } from '@momentum-ui/react-collaboration';

const Component = () => (
  <div>
    <Button name="primary" size="large">
      Welcome to Momentum UI - React Collaboration - Button
    </Button>
  </div>
);

/* ...export statements... */