The Liberation Machine - Vue
Publish package
- Build your core stencil package.
- Run build on this package.
- Publish.
Use in Vue
Import the library plugin in the main.js
file:
import { TlmComponents } from 'tlm-vue';
createApp(App).use(TlmComponents).mount('#app');
You can then use your components within vue:
<template>
<tlm-button test-id="test-id" disabled="false">Press here</tlm-button>
</template>
<script>
import { TlmButton } from 'tlm-vue';
export default {
name: 'HelloWorld',
components: {
TlmButton
}
}
Known Issues
Vue will throw a deprecation error if slots
are used. This is due to eslint
misidentifying the slots as outdated Vue 2
syntax.
To disable the error, add the following under eslintConfig
within the package.json
:
"rules": {
"vue/no-deprecated-slot-attribute": "off"
}