hanker-component-lib
v0.0.3
Published
- React 18+ - Vite - Typescript - TailwindCSS - PostCSS - ESLint - Husky
Readme
Hanker Component Library
Core Technologies
- React 18+
- Vite
- Typescript
- TailwindCSS
- PostCSS
- ESLint
- Husky
How to Build and Manage Components?
Creating New Components
- Create individual Component files in the
/componentsdirectory - Export all of these components in the
/components/index.tsfile, this is where the build instructions are pulling components from
Editing Components
- Simply edit them
How to deploy changes
- Once your changes have been made and tested locally, increment the version number in the
package.jsonfile. This is a requirement for the NPM Registry. Use Semantic Versioning as much as possible. - Run
npm run buildto build the latest version of the package with your updates. - In the terminal, from the top-level project directory
/hanker-component-lib, log in to your NPM account withnpm auth login. - Run
npm publish
How to consume new changes?
- Update the package manually from the CONSUMING APPLICATION
- Increment the
hanker-component-libindependenciesto the new version. - Run a new
npm installoryarn
- Increment the
Instructions for Consumption
- Install the package with NPM or Yarn:
npm i hanker-component-lib
2. In the Consuming Application's tailwind.config.js file, add the following line in the content block:
"./node_modules/hanker-component-lib/**/*.{js,ts,jsx,tsx}"
3. Import and use components as normal in your files
4. Override the imported components styling using the Tailwind Config
Local Development
npm run [command]will run the Vite build commands under the hood, checkpackage.jsonfor full details.npm run devto test locally
