Add this in the tailwind.config.js
// tailwind.config.js
module.exports = {
// import the tailwind config from Zeal.
presets: [require('@deepsourcelabs/zeal/tailwind.config')],
// Don't purge zeal styles
purge: {
enabled: true,
content: ['./pages/**/*', './components/**/*', './node_modules/@deepsourcelabs/**/*.vue']
}
}
- Node: v14@latest
- yarn: v1
- Clone the Repo using
git clone https://github.com/DeepSourceCorp/zeal
- Run
yarn
to install all dependencies - Run
yarn storybook:serve
to run the dev server and storybook for development
The following NPM scripts help building the library
yarn build-lib
: This will build the library withmain.ts
as the input fileyarn build-storybook
: This will build the Storybookyarn build_icons
: This will fetch the svg icons from thesrc/icons
and build a JSON fileyarn build:css
: This will run post css and generate the CSS files for tailwind and other componentsyarn build-lib-icons
: This will build the library, css files and the icons
Before you begin, ensure you have the .npmrc
file setup.
- Bump the version in
package.json
and commit that change - Remove
private: true
from thepackage.json
(revert after publishing) - Run
yarn test:unit && yarn build-lib-icons
- On successful test and build run
npm publish
Note: Add
private: true
back after publishing. In CI, don't forget to run yarn before step 3
- For generic icons, replace all custom colors added to the SVG file with
currentColor
- Optimize the SVG using SVGOMG
- Create a new SVG file unde the
src/icons
folder and paste the optimized SVG into it - Run
yarn build_icons
to update theicons.json
file - Verify the icons look alright by starting the storybook locally using
yarn storybook:serve
- Make a pull request for it with the screenshots of the icon preview in storybook