3.6.13 • Published 4 days ago

@felix-health/vue-components v3.6.13

Weekly downloads
-
License
MIT
Repository
-
Last release
4 days ago

Felix Health Vue Component Library

A Vue CLI project that contains all of Felix Health's vue components and documentation for those components.

To consume in a project

  1. npm i @felix-health/vue-components
  2. Currently this project depends on TailwindCSS (and our Tailwind design system).`

  3. Import the library css into your main css file:

@import '@felix-health/vue-components/dist/components-library.css';
  1. Import all of the components in your main js file:
import * as FelixComponents from '@felix-health/vue-components';

// Global registration in your main.js/App.vue file
Object.entries(FelixComponents).forEach((name, component) => {
  Vue.component([name, component]);
});

Note that some components depend on things like the document or window object to work. We have an option to separate component imports between ones that work on server side, and ones that work on the client so that you can deal with them differently. This is helpful in frameworks like Nuxt where you want to be able to register compatable components on the server. You can import them like this:

import * as ServerComponents from '@felix-health/vue-components/dist/server-components/components-library-server.umd';
import * as ClientComponents from '@felix-health/vue-components/dist/client-components/components-library-client.umd';

Note: If you are adding a net new component to this repo ensure you are exporting it in either the ServerComponents or ClientComponents index.js file.

Branch naming

  • For vue-3 only changes (i.e. merging to vue-3-only branch), prefix the branch name with mbl to skip styleguidist preview step in github action

To add / update a component

  • To update any existing shared components (i.e. components that are not in this list)

    • If changes do not involve vue2->vue3 breaking change (e.g. v-model usage, render fucntion, $parent $children, vue2 only 3rd party packages), then no change is needed on vue-3-only branch, since we rebase regularly, these changes should reflect there after a rebase
    • If changes are not vue-3 friendly, please add a separate component (see steps below) / create a ticket to add that later
  • To add / update any vue-3 specific components (these components DO NOT exist in main branch in the time being)

    • Checkout vue-3-only branch, rebase latest main branch onto this branch (there'll most likely be conflicts, just make sure the package name i.e. @felix-health/vue-components-vue3 and version number is not overwritten by changes from main)
    • Push to remote after rebase is successful
    • Checkout out a new branch for the changes you'll be adding (branch off from vue-3-only ), prefix the branch name with mbl to skip styleguidist preview step in github action
    • All the vue-3 only components live under a /v3 directory from the existing component directory, if it doesn't already exist, please create one
    • If the changes you're making is on an existing vue-3 component, you can push up your branch for review!
    • If the changes you're making is splitting an existing SHARED component into vue-2 and vue-3, remove that component export in /{client-build/server-build}/index.js , add the export in /{client-build/server-build}/vue2Components.js and /{client-build/server-build}/vue3Components.js accordingly, push up for review, add the component to the list for tracking, push up for review!
    • If the changes you're making is solely adding a new vue-3 component, just add the export in /{client-build/server-build}/vue2Components.js, push up for review!

      Note that the styleguidist doesn't work with vue 3, so as a temporary way to test out components, we use the /styleguide pages in Charm. For more details please refer to the readme in vue-3-only branch.

To publish a new version

  1. Bump the version in package.json
  2. Make a PR
  3. Merge into the main branch
  4. yarn build-lib and then npm publish --access public

Project local setup

yarn install

Run unit tests

We use Vue Testing Library with Jest for unit testing. To write a new test, add a .spec.js file next to the component file you're working in.

# run test in watch mode
yarn test
# run test full test suite
yarn test:unit

Spin up the documentation

yarn styleguide
hosted on http://0.0.0.0:6060/

Build the documentation for production

yarn styleguide:build

This adds a docs folder which can be served as a static website.

Compiles and minifies for production npm build (Ensure to do this before publishing to npm!!)

yarn build-lib

Lints and fixes files

We also lint staged files before every commit using lint-staged and husky

yarn lint

Format files

We also format staged files before every commit using lint-staged and husky

# checks files for formatting issues
yarn format:check
# fixes formatting issues
yarn format:write

Customize configuration

See Configuration Reference.

Built from guide here: https://javascript.plainenglish.io/how-to-create-test-bundle-vue-components-library-8c4828ab7b00

3.6.13

4 days ago

3.6.12

7 days ago

3.6.11

10 days ago

3.6.10

11 days ago

3.6.8

16 days ago

3.6.6

1 month ago

3.6.5

1 month ago

3.6.4

1 month ago

3.6.3

2 months ago

3.6.2

2 months ago

3.6.1

2 months ago

3.6.0

2 months ago

3.5.10

3 months ago

3.5.9

3 months ago

3.5.8

3 months ago

3.3.7

3 months ago

3.4.8

3 months ago

3.4.7

3 months ago

3.2.7

3 months ago

3.2.6

4 months ago

3.2.5

4 months ago

3.2.4

4 months ago

3.2.3

4 months ago

3.2.2

4 months ago

3.2.1

4 months ago

3.2.0

4 months ago

3.1.2

4 months ago

3.1.1

5 months ago

3.1.0

5 months ago

3.0.3

5 months ago

3.0.2

5 months ago

2.0.7

10 months ago

2.3.0

10 months ago

2.3.2

9 months ago

2.3.1

9 months ago

2.3.4

9 months ago

2.3.3

9 months ago

2.3.6

8 months ago

2.3.5

8 months ago

2.2.1

10 months ago

2.2.0

10 months ago

3.0.1

5 months ago

3.0.0

6 months ago

2.1.0

10 months ago

2.0.5

10 months ago

2.0.6

10 months ago

2.0.3

11 months ago

2.0.4

11 months ago

2.0.2

11 months ago

2.0.1

12 months ago

2.0.0

12 months ago

1.15.0

12 months ago

1.14.20

1 year ago

1.14.21

1 year ago

1.14.22

1 year ago

1.14.23

1 year ago

1.14.28

1 year ago

1.14.29

1 year ago

1.14.24

1 year ago

1.14.25

1 year ago

1.14.26

1 year ago

1.14.27

1 year ago

1.14.17

1 year ago

1.14.18

1 year ago

1.14.19

1 year ago

1.14.14

1 year ago

1.14.15

1 year ago

1.14.16

1 year ago

1.14.10

1 year ago

1.14.11

1 year ago

1.14.12

1 year ago

1.14.13

1 year ago

1.14.1

2 years ago

1.14.0

2 years ago

1.14.5

1 year ago

1.14.4

2 years ago

1.14.3

2 years ago

1.14.2

2 years ago

1.14.9

1 year ago

1.14.8

1 year ago

1.14.7

1 year ago

1.14.6

1 year ago

1.13.1

2 years ago

1.10.2

2 years ago

1.7.10

2 years ago

1.7.9

2 years ago

1.7.8

2 years ago

1.7.7

2 years ago

1.7.6

2 years ago

1.7.5

2 years ago

1.7.4

2 years ago

1.11.3

2 years ago

1.11.2

2 years ago

1.11.1

2 years ago

1.9.1

2 years ago

1.11.31

2 years ago

1.9.0

2 years ago

1.11.34

2 years ago

1.11.32

2 years ago

1.11.33

2 years ago

1.10.1

2 years ago

1.10.0

2 years ago

1.12.1

2 years ago

1.12.0

2 years ago

1.8.0

2 years ago

1.11.0

2 years ago

1.13.0

2 years ago

1.6.1

2 years ago

1.7.3

2 years ago

1.7.2

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.43

2 years ago

0.5.41

2 years ago

0.5.42

2 years ago

0.5.40

2 years ago

1.5.42

2 years ago

0.5.39

2 years ago

0.5.38

2 years ago

0.5.36

2 years ago

0.5.37

2 years ago

0.5.34

2 years ago

0.5.35

2 years ago

0.5.32

2 years ago

0.5.33

2 years ago

0.5.30

2 years ago

0.5.31

2 years ago

0.5.29

2 years ago

0.5.28

2 years ago

0.5.10

2 years ago

0.4.9

2 years ago

0.4.8

2 years ago

0.5.18

2 years ago

0.5.19

2 years ago

0.5.16

2 years ago

0.5.17

2 years ago

0.5.14

2 years ago

0.5.15

2 years ago

0.5.12

2 years ago

0.5.13

2 years ago

0.5.4

2 years ago

0.5.3

2 years ago

0.5.6

2 years ago

0.5.5

2 years ago

0.5.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.8

2 years ago

0.5.7

2 years ago

0.5.9

2 years ago

0.5.21

2 years ago

0.5.22

2 years ago

0.4.10

2 years ago

0.5.20

2 years ago

0.4.17

2 years ago

0.4.18

2 years ago

0.5.27

2 years ago

0.4.15

2 years ago

0.5.25

2 years ago

0.5.26

2 years ago

0.4.14

2 years ago

0.5.23

2 years ago

0.4.11

2 years ago

0.5.24

2 years ago

0.4.12

2 years ago

0.4.5

2 years ago

0.4.7

2 years ago

0.4.6

2 years ago

0.3.9

2 years ago

0.3.0

2 years ago

0.3.6

2 years ago

0.4.4

2 years ago

0.3.5

2 years ago

0.3.8

2 years ago

0.2.9

2 years ago

0.3.7

2 years ago

0.4.1

2 years ago

0.3.2

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.4.3

2 years ago

0.3.4

2 years ago

0.4.2

2 years ago

0.3.3

2 years ago

0.2.8

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago