0.0.7 • Published 3 years ago
@deus-labs/tools-components v0.0.7
Shared component library for deus-labs -tools projects
Instructions
1. Packing up the library
The components reside in the src folder. Keeping the current folder structure intact, you may add, remove or update components before bundling them into a package.
- Installing the necessary packages via npm:
npm install- Running rollup to generate the bundle:
npm run rollupYou should now have a dist folder ready with the bundled components.
2. Publishing the package
- Make sure that you have an
.npmrcfile ready in your Home folder with the following content:
registry=https://registry.npmjs.org/
@deus-labs:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=<Github authentication token for deus-labs>Make sure that you have incremented the Version number for the package in the
package.jsonfile.Run the following command to publish the package:
npm publish3. Using the package
- Install the package via npm:
npm i @deus-labs/tools-components- Install
postcss-importvia npm:
npm i postcss-import- Import the
index.cssfile that's included in the package:
import '@deus-labs/tools-components/dist/esm/index.css';- Import the components you need into your project:
e.g.
import Button from '@deus-labs/tools-components';