1.0.1 • Published 5 years ago
components-library-demo v1.0.1
Demo component library
First time setup
- Use only
npmfor running scripts, in order to avoid some unexpected conflicts with different.lockfiles; - Run
npm icommand to install project dependencies; - Run
npm run startto start Storybook and review components.
Publishing
Note: before publishing packages, you must have npm account and setup organization in order to publish scoped packages.
- Build components by running
npm run build:componentscommand; - Publish components by running
npm run publish:componentscommand.
Development
- Create new component under
srcdirectory; - Every component must have
srcdirectory with all of the source code. Includeindex.jsfile in order to avoid specific file path import declaration; - Each component must include
package.jsonfile, and should include.npmignore,CHANGELOG.md,LICENCE,README.mdfiles; - When using imports from other components use their
package.jsonname and include that name and specific path to aliases under /configs/aliases.config.js; - In order to check if published component works, add dependency to root
package.jsonfile, runnpm icommand and comment specific alias. Run storybook and test it.