2.8.9 • Published 2 years ago
@sanger-surveillance-operations/ui-library v2.8.9
Install
Install the component library as a dependency using npm.
npm install @sanger-surveillance-operations/ui-libraryRegister
Register the components with Vue and import styles to make them globally available in your app.
import Vue from 'vue'
import SangerComponents from '@sanger-surveillance-operations/ui-library'
import '@sanger-surveillance-operations/ui-library/dist/ui-library.css'
Vue.use(SangerComponents)Use
Now you can use them in your own Vue components.
<template>
<div>
<sa-button text="A button" />
</div>
</template>Contribute
Project setup
npm installAdding a component
- Create a new component folder by copying the
_component-templatefolder - Rename the component, test files and their contents by replacing
SaComponentwithSa[YourComponentName]following the structure of the other components. - Add the component to
src/components/index.js
Start the development server
npm startBuild for production
npm run buildLint and fix files
npm run lintPublish a new version
npm login # if not already logged in
npm version <new version>
git push
npm publishA production build is automatically created before publishing so there's no need
to explicitly run npm run build.