0.0.14 • Published 2 years ago

@greggs/components-vue v0.0.14

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Use the library in Greggs projects

$ npm i @greggs/components-vue --save

Then, add to the modules array of your nuxt.config.ts

modules: [
  '@greggs/components-vue/nuxt'
]

This iteration of the library does not do any building or bundling. It's simply a place to store shared components used across the Greggs group sites.

Then import whatever component has been integrated into the library (at this time of writing, it's simply the <VideoPlayer /> component for a proof of concept).

The library has a Lib prefix for the auto-imports, so you would use it like: <LibContentMediaVideoPlayer />

Caveats

  1. Components that use Tailwind classes not used in the consuming site will be purged, so you must add these classes to the safelist of the Tailwind config.

  2. Links to other component imports in the component library should be relative because aliases with @, ~ etc will look to the consuming site and break. We could add our own custom aliases for the library specifically?