1.5.0 • Published 4 months ago

@worksafevictoria/wcl7.5 v1.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

WorkSafe Component Library SB7 (for Storybook 7)

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.

Minimum Requirements

  1. Yarn -> Latest (Needed for workspaces)
  2. Node -> latest version 18.19.0
  3. VSCode preferred
  4. ESLint should be installed globally (npm install -g eslint)
  5. Vue Dev tools plugin for Chrome / Firefox
  6. Bootstrap-Vue-Next required (npm i bootstrap-vue-next)
  7. Accessibility Add-on (yarn add @storybook/addon-a11y --dev)
  8. Vite SVG Loader (npm install vite-svg-loader --save-dev)

Fresh Install

git clone <this-repo>
chmod +x bin/clean.sh
yarn reinstall

Run Dev

yarn storybook

Build

yarn build-storybook

Note:  When building storybook, there is a dependency on a .nojekyll file in order for Storybook to display stories.

Deploy

chmod +x bin/deploy.sh
yarn deploy

Release - Dry run

yarn dryrun

Release

yarn release

Usage Instructions - Yarn - recommended

yarn add @worksafevictoria/wcl7.5

Usage Instructions - npm

npm i @worksafevictoria/wcl7.5

Nuxt - if you have errors after importing

# nuxt.config.js

build {
  transpile: ['@worksafevictoria/wcl7.5', 'xxx', 'xxx', 'xxx']
}

Usage Instructions - environment variables

For environment variables to be recognised, they must be added to the vite.config.js to the existing list under 'define', eg

  .env:

    IS_STORYBOOK=TRUE

  .vite.config.js:

    'process.env.IS_STORYBOOK': `"${process.env.IS_STORYBOOK}"`,

Import example

<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/wcl7.5'
  export default {
    components: { Container, Column, Row, CtaButton }
  }
</script>

<style lang="scss" scoped>
  @import './styles';
</style>

Deployment Process - Beta

Deployment Process - Hotfix

Deployment Process - Release


Instructions linked to Vue 3/Storybook 7 template

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Compile and Minify for Production

npm run build

Run Unit Tests with Vitest

npm run test:unit

Lint with ESLint

npm run lint
1.1.0-beta.99

4 months ago

1.1.0-beta.95

5 months ago

1.1.0-beta.98

4 months ago

1.1.0-beta.96

4 months ago

1.1.0-beta.97

4 months ago

1.1.0-beta.94

5 months ago

1.1.0-beta.93

5 months ago

1.1.0-beta.92

5 months ago

1.1.0-beta.90

5 months ago

1.1.0-beta.91

5 months ago

1.1.0-beta.87

5 months ago

1.1.0-beta.88

5 months ago

1.1.0-beta.89

5 months ago

1.1.0-beta.80

6 months ago

1.1.0-beta.79

6 months ago

1.1.0-beta.83

5 months ago

1.1.0-beta.84

5 months ago

1.1.0-beta.81

6 months ago

1.1.0-beta.82

5 months ago

1.1.0-beta.85

5 months ago

1.1.0-beta.86

5 months ago

1.1.0-beta.76

6 months ago

1.1.0-beta.77

6 months ago

1.1.0-beta.75

6 months ago

1.1.0-beta.78

6 months ago

1.1.0-beta.73

6 months ago

1.1.0-beta.74

6 months ago

1.1.0-beta.72

7 months ago

1.1.0-beta.70

7 months ago

1.1.0-beta.71

7 months ago

1.1.0-beta.65

7 months ago

1.1.0-beta.66

7 months ago

1.1.0-beta.69

7 months ago

1.1.0-beta.67

7 months ago

1.1.0-beta.68

7 months ago

1.1.0-beta.63

7 months ago

1.1.0-beta.64

7 months ago

1.1.0-beta.61

7 months ago

1.1.0-beta.62

7 months ago

1.1.0-beta.60

7 months ago

1.5.0

7 months ago

1.1.0-beta.59

7 months ago

1.1.0-beta.58

7 months ago

1.1.0-beta.56

7 months ago

1.1.0-beta.57

7 months ago

1.4.0

8 months ago

1.1.0-beta.54

8 months ago

1.1.0-beta.55

8 months ago

1.1.0-beta.53

8 months ago

1.1.0-beta.50

8 months ago

1.1.0-beta.51

8 months ago

1.1.0-beta.52

8 months ago

1.1.0-beta.48

8 months ago

1.1.0-beta.49

8 months ago

1.1.0-beta.47

8 months ago

1.1.0-beta.46

8 months ago

1.2.2

8 months ago

1.2.1

8 months ago

1.3.0

8 months ago

1.1.0-beta.43

8 months ago

1.1.0-beta.44

8 months ago

1.1.0-beta.45

8 months ago

1.1.0-beta.41

10 months ago

1.1.0-beta.42

9 months ago

1.2.0

11 months ago

1.1.0-beta.37

11 months ago

1.1.0-beta.38

11 months ago

1.1.0-beta.39

11 months ago

1.1.0-beta.40

10 months ago

1.1.23

11 months ago

1.1.0-beta.36

11 months ago

1.1.0-beta.34

11 months ago

1.1.0-beta.35

11 months ago

1.1.0-beta.29

11 months ago

1.1.0-beta.28

12 months ago

1.1.0-beta.32

11 months ago

1.1.0-beta.33

11 months ago

1.1.0-beta.30

11 months ago

1.1.0-beta.31

11 months ago

1.1.22

11 months ago

1.1.0-beta.25

12 months ago

1.1.0-beta.26

12 months ago

1.1.0-beta.27

12 months ago

1.1.21

12 months ago

1.1.20

12 months ago

1.1.0-beta.24

12 months ago

1.1.16

12 months ago

1.1.19

12 months ago

1.1.18

12 months ago

1.1.17

12 months ago

1.1.0-beta.21

12 months ago

1.1.0-beta.22

12 months ago

1.1.0-beta.20

12 months ago

1.1.0-beta.23

12 months ago

1.1.0-beta.18

12 months ago

1.1.15

12 months ago

1.1.0-beta.19

12 months ago

1.1.0-beta.17

12 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.0-beta.10

1 year ago

1.1.0-beta.11

1 year ago

1.1.0-beta.14

1 year ago

1.1.12

1 year ago

1.1.0-beta.15

12 months ago

1.1.11

1 year ago

1.1.0-beta.12

1 year ago

1.1.10

1 year ago

1.1.0-beta.13

1 year ago

1.1.14

12 months ago

1.1.0-beta.16

12 months ago

1.1.13

1 year ago

1.1.0-beta.9

1 year ago

1.1.0-beta.8

1 year ago

1.1.0-beta.7

1 year ago

1.1.0-beta.2

1 year ago

1.1.0-beta.1

1 year ago

1.1.0-beta.6

1 year ago

1.1.0-beta.5

1 year ago

1.1.0-beta.4

1 year ago

1.1.0-beta.3

1 year ago

1.0.0

1 year ago