@medworld/pulse-ui
v0.8.0
Published
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Downloads
4
Keywords
Readme
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Setting up the Dev environment
Prerequisites
1. Homebrew (to manage tools and versions)
OR update
brew update
AND upgrade installed formulae
brew upgrade
2. NVM (to manage Node versions)
brew install nvm
Switch to recommended node version (see
.nvmrc
for required version number)nvm install nvm use
3. Yarn (for JS dependency management)
brew install yarn
Setup
Install dependencies
nvm use
yarn install
Run
yarn run storybook
Linking/consuming the package locally
1. Build /dist folder and link the package
yarn local-package
2. Add package to consuming project
In the consuming project run yarn link "@medworld/pulse-ui"
Unlinking
This project
cd dist
yarn unlink
Consuming project
yarn unlink @medworld/pulse-ui
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptions
property like this:
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
};