This repo is based on Vue 3 in Vite, and Storybook 7. It contains all the common components used on the WorkSafe Victoria public website.
- Yarn -> Latest (Needed for workspaces)
- Node -> latest version 18.19.0
- VSCode preferred
- ESLint should be installed globally (npm install -g eslint)
- Vue Dev tools plugin for Chrome / Firefox
- Bootstrap-Vue-Next required (npm i bootstrap-vue-next)
- Accessibility Add-on (yarn add @storybook/addon-a11y --dev)
- Vite SVG Loader (npm install vite-svg-loader --save-dev)
git clone <this-repo>
chmod +x bin/clean.sh
yarn reinstall
yarn storybook
yarn build-storybook
chmod +x bin/deploy.sh
yarn deploy
yarn dryrun
yarn release
yarn add @worksafevictoria/wcl
npm i @worksafevictoria/wcl
# nuxt.config.js
build {
transpile: ['@worksafevictoria/wcl', 'xxx', 'xxx', 'xxx']
}
<template>
<container>
<row>
<column :md="6">
<cta-button @clicked="$emit('nextScreen')">Start</cta-button>
</column>
</row>
</container>
</template>
<script>
import { Container, Column, Row, CtaButton } from '@worksafevictoria/wcl'
export default {
components: { Container, Column, Row, CtaButton }
}
</script>
<style lang="scss" scoped>
@import './styles';
</style>
- Checkout beta
- Create a fresh branch from beta
feat/JIRA-ID
- ....Add changes....
- After commits are added to this branch merge
beta
intofeat/JIRA-ID
yarn test
- Create Pull Request from
feat/JIRA-ID
tobeta
- Request code review from fellow FE Developers
- Merge
feat/JIRA-ID
intoBeta
- Checkout release
- Create a fresh branch from release
hotfix/JIRA-ID
- ....Add changes....
- After commits are added to this branch merge
release
intofeat/JIRA-ID
yarn test
- Create Pull Request from
feat/JIRA-ID
torelease
- Request code review from fellow FE Developers
- Merge
feat/JIRA-ID
intorelease
- Approve and release npm deployment from the release pipeline
- Manually add your changes to
beta
using the steps for "Deployment Process - Beta"
- Create Pull Request from
beta
torelease
- Request code review from
@worksafedigital
- Merge
feat/JIRA-ID
intorelease
- Approve and release npm deployment from the release pipeline
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
See Vite Configuration Reference.
npm install
npm run dev
npm run build
Run Unit Tests with Vitest
npm run test:unit
Lint with ESLint
npm run lint