@renassimo/demo-library-react v1.3.0
demo-library-react
This is a common demo repository of UI elements for React and NextJS apps
yarn add @renassimo/demo-library-react
Demo
Run and find elements in local server
- Clone this repo
- Install project by running
yarn
command - Run
yarn storybook
to look at component instances on http://localhost:6006/
WorkFlow
- All components should be created in src/lib directory
- Create tests on src/__tests__ directory only
- Each component should be exported from
index.js
file in src/lib - Each component's demo should be added to storybook (src/stories)
Publishing package
You should do it by promotion button on semaphore.
It's possible on the master
branch only.
You can publish with updating to new patch (ex. 1.2.0
-> 1.2.1
),
minor (ex. 1.2.1
-> 1.3.0
) or major (ex. 1.3.1
-> 2.0.0
) versions.
Each promotion will create a new tag in github repo and update version in package.json
file:
DANGER ZONE!!!
- If any problems acquired just update version manually in
package.json
, runyarn dist
and thenyarn publish dist
commands. - DO NOT run
npm logout
command - it will kill current npm token, you should get new one - To remove the version of package run command like
npm unpublish -f @renassimo/demo-library-react@1.1.6
- that will remove version1.1.6
if it has not too many downloads. - To deprecate the version of package run command like
npm deprecate @renassimo/demo-library-react@0.1.2 'Deprecated message'
- that will deprecate version0.1.2
.
Install
If you use NPM:
npm install --save @renassimo/demo-library-react
Or if you use yarn:
yarn add @renassimo/demo-library-react
Install from local
If you use NPM:
npm install --save ../demo-library-react/dist
Or if you use yarn:
yarn add ../demo-library-react/dist
Where ../demo-library-react/dist
- is the path to local demo-library-react repository's dist
directory.
Run yarn dist
before installing the local package to have actual version.
Setting up in the project (If this package is private)
- Create
.npmrc
file in the root of directory - Add:
//registry.npmjs.org/:_authToken=
- Add read only auth token after
=
Using component in the project
- Just import as in example bellow:
impport { Logo } from '@renassimo/demo-library-react';
- Use it like the ordinary component
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago