0.2.6 • Published 3 years ago
@societyone/s1-component-library v0.2.6
Project setup
yarn install
Compiles and hot-reloads for development
yarn run serve
Compiles and minifies for production
yarn run build
Lints and fixes files
yarn run lint
How to publish changes to the component library
Note: You will need to be added as an admin before you are able to publish to the npm module
- clone repo to your local machine
- Run
yarn install
- run
yarn run serve
- Make your changes, update the version in package.json (you will not be able to publish without doing this)
- Once ready to commit your changes, run
yarn run build-bundle
(this generates you /dist/ files to be used in your projects) - Commit your changes and push
- Run
npm publish
- and tada! You just published your changes - Finally, in your project (e.g. the Agri Portals), run
yarn add @societyone/s1-component-library@latest
to pull in the latest version of the module into your project
How to use this library
To use this library in your project, you will need to have tailwind.js already set up. A guide to doing so can be found here https://tailwindcss.com/docs/installation.
Once the installation is complete, you should have a tailwind.js file that resembled that in this repository (see tailwind.js). To use the component library in your project you will need to import the tailwind config from this repo, into your projects local tailwind.js file. Follow the below steps to get set up:
- Install Tailwind into your local project (https://tailwindcss.com/docs/installation), you should have a tailwind.js file included in your set up.
- Install the component library in your project using
yarn add @societyone/s1-component-library@latest
- Copy the example.tailwind.js file into the local tailwind.js file in your project to import the component library config and link it to the generated classes in your local config.
Access
To gain access to editor rights for the component library, you will need to be added by an admin.