-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
-
Clone SHARED.UI project -
git clone https://github.com/Impakter/SHARED.UI.git
. -
Create a new component or update the existing component in the appropriate sub-folder in /components folder.
-
Add the component on index.js file in /components folder if new component is created.
-
Push the changes to master branch
Now that we have components in shared UI library, we can use those components anywhere in any other project. Make sure either the SHARED.UI library is already added to the project where you want to use the shared components.
Check if the SHARED.UI is already added to a project:
You can confirm this by checking package.json file of that project which should contain “uicomponents” in the list of dependencies.
Use npm update
from CLI to fetch the latest changes from SHARED.UI library.
(or)
If it’s a New Project:
From the project where you want to use the Shared UI components, go to CLI and use
npm add https://github.com/Impakter/SHARED.UI.git —-save
to add the SHARED.UI library.
Use import { ComponentName } from “uicomponents”
inside the parent component where you want to use SHARED.UI components.
`
<script> import {NewsArticle} from "uicomponents" export default { name: "NewsHome", data(){ return { } }, components:{ NewsArticle} } </script>`