0.25.1 • Published 1 year ago

@moxiworks/mds-vue v0.25.1

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

@moxiworks/mds-vue

npm

This package in the monorepo serves as the Vue integration for the Stencil-generated components. The lib directory within this package contains the Stencil-generated components, which are built to be consumed by Vue applications.

Generating the lib Directory

The lib directory holds the Stencil-generated components, which serve as the foundation for the Vue library. These components are defined using web standards and can be used seamlessly within Vue applications. To generate the lib directory, run the build script in the stencil-library package. In the packages/stencil-library/stencil.config.ts, you can see the config for outputting this.

Building the lib Directory

The yarn build script handles the tsc build. The output is stored in the dist directory. Only run this command after successfully completing the previous step.

Usage

  1. In your vue application, add the @moxiworks/mds-vue package to your dependancies.

    Make sure you replace the x.x.x with the latest version, we can be found in the badge at the top of this doc. Avoid using ^ or ~, as we want to be using the exact value.

"dependencies": {
  "@moxiworks/mds-vue": "x.x.x"
}
  1. Install the package
yarn install
// or
npm install
  1. Define the custom components in the vite.config.ts file.
export default defineConfig({
  plugins: [
+   vue({
+     template: {
+       compilerOptions: {
+         // treat all tags with a `mx-` as custom elements
+         isCustomElement: (tag) => tag.startsWith('mx-'),
+       },
+     },
+   }),
    vueJsx(),
  ],
})
  1. Import the component library plugin in the main.js file. Also include the mds-core.css stylesheet
// src/main.js
+ import '@moxiworks/mds-vue/dist/styles/mds-core.css'
import { createApp } from 'vue'
import App from './App.vue'
+ import { ComponentLibrary } from '@moxiworks/mds-vue';

+ createApp(App).use(ComponentLibrary).mount('#app');
  1. Use the components.
<template>
  <mx-button icon="mds-check">It works!</mx-button>
</template>
0.25.1

1 year ago

0.25.0

1 year ago

0.23.0

1 year ago

0.24.0

1 year ago

0.22.2

1 year ago

0.22.1

1 year ago

0.22.0

1 year ago

0.21.1

1 year ago

0.21.0

1 year ago

0.20.0

1 year ago

0.19.0

1 year ago

0.18.0

1 year ago

0.17.1

1 year ago

0.17.0

1 year ago

0.16.2

2 years ago

0.16.1

2 years ago

0.16.0

2 years ago

0.15.1

2 years ago

0.15.0

2 years ago

0.14.0

2 years ago

0.13.3

2 years ago

0.13.2

2 years ago

0.13.1

2 years ago

0.13.0

2 years ago

0.12.2

2 years ago

0.12.1

2 years ago

0.12.0

2 years ago

0.11.0

2 years ago

0.10.0

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.13

2 years ago

0.4.12

2 years ago

0.4.11

2 years ago

0.4.10

2 years ago

0.4.9

2 years ago

0.4.8

2 years ago

0.4.7

2 years ago

0.4.6

2 years ago

0.4.4

2 years ago

0.4.3

2 years ago

0.4.1

2 years ago

0.0.1-alpha.0

2 years ago