0.0.46 • Published 3 years ago
test-components-bundle v0.0.46
to run project
- have npm (yarn) and npx installed (since npm version 5.2.0 npx is pre-bundled with npm)
- npm i / yarn install
npm run storybook
/yarn storybook
- to run storybook dev env /npm run build
/yarn build
- to build components bundle
To test lib in local repository:
1. cd <components-bundle>
2. npm run build
or yarn build
3. cd <your project>
4. import lib from local repo npm install --save ../path/to/components-bundle
or yarn add ../path/to/components-bundle
5. you'll get smth like this:
{
"name": "bundle",
"dependencies": {
"ui-components": "link:../path/to/ui-components"
}
}
but most likely you'll meet dependency conflict
- use components in your project
THE OTHER WAY is to import .tgz to your project, which is always generated during build This way should be preferable, because it doesn't contain node_modules folder, which eliminates package version collision
{
"name": "bundle",
"dependencies": {
"ui-components": "file:../<your bundle location>/components-bundle-v0.0.X.tgz"
}
}
For some cases would be good idea to initiate cache clean for package manager There is no react stated in package.json due to react version conflict with material-ui / emotion-react