## How to Run local server of Edrone Components Library ```shell cd componenets-lib ``` ```js npm install ``` ```js npm run serve ```
npm install edrone-components-libshell
cd componenets-lib
`
`js
npm install
`
`js
npm run serve
`How to add new component to Edrone Components Library
1. Add new component
`shell
src/lib-components/
`
- use TypeScript
- use methods from @vue/composition-api plugin (migration to vue3)
- use SCSS preprocessor and place styles in separate files in location:
`shell
src/lib-scss/
`
- for any assets required to build components use location:
`shell
src/lib-assets/
`2. Add Unit test for component
`shell
tests/
`
more info goes here3. Add component story into storybook
- include all props, events
`shell
stories/
`4. Update changelog
`shell
CHANGELOG.md
`5. Run Chromatic (for UI tests and UI review):
- add environment variable
CHROMATIC_PROJECT_TOKEN with project token generated in the Chromatic project's settings
(how to set env variable in Linux)
- npm run chromatic
How to update npm package with new changes
1. Add new version to package.json
`js
{
"name": "edrone-components-lib",
"version": "0.0.3", //semantic versioning
"description": "",
...
`2. Build project
`shell
npm run build
`3. Connect to edrone npm account via CLI
`shell
npm adduser
`
- username: ask admin
- password: ask admin
- email: ask admin
- OTP: ask admin4. Push new package to www.npmjs.com
`shell
npm publish
`
5. Update MissionControl and Admin projects with latest version of the package
`js
"edrone-components-lib": "0.0.3",
``