- Use only
npm
for running scripts, in order to avoid some unexpected conflicts with different.lock
files; - Run
npm i
command to install project dependencies; - Run
npm run start
to start Storybook and review components.
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:components
command; - Publish components by running
npm run publish:components
command.
- Create new component under
src
directory; - Every component must have
src
directory with all of the source code. Includeindex.js
file in order to avoid specific file path import declaration; - Each component must include
package.json
file, and should include.npmignore
,CHANGELOG.md
,LICENCE
,README.md
files; - When using imports from other components use their
package.json
name 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.json
file, runnpm i
command and comment specific alias. Run storybook and test it.