0.0.8 • Published 1 year ago
av-ui-library-test v0.0.8
Assembly Voting UI Library
TO-DO
Description...
Setup
npm i npm-package-name
yarn add npm-package-name
Importing library as a plugin
In the main file:
import * as UILibrary from "npm-package-name"; // Imports components
import "npm-package-name/styles"; // Imports styles
const app = createApp(App);
app.use(UILibrary.default); // Plugin-in the library
app.mount("#app");
Importing components individually
In the file you want to use it:
import { ComponentName } from 'npm-package-name'
<component-name />
Project Setup
yarn
Compile and Hot-Reload for Development
yarn dev
Type-Check, Compile and Minify for Production
yarn build
Run Unit Tests with Vitest
yarn test
Lint with ESLint
yarn lint
Start Storybook for Development
yarn storybook
Compile Storybook for Production
yarn build-storybook
Creating new components
Remember to include them on the component index at:
@app/src/components.index.ts
and then add them in the Library (both as plugin component and as regular export) at:
@app/src/UILibrary.ts