Skip to content

Commit

Permalink
chore: Update package version to 1.6.3 and fix style tag injection is…
Browse files Browse the repository at this point in the history
…sue and update docs for vuetify
  • Loading branch information
EranGrin committed Jul 12, 2024
1 parent d2fe7ac commit 2fea0c9
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format

## [Unreleased]

## [1.6.3] - 12.07.2024
### Added
- Fixed issue with style tag injection order SFC
- Fixed duplicate style tags for cssFrameworkStyles

## [1.6.2] - 05.07.2024
### Fixed
- Fixed issue style tag injection order
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ Check out these demo projects to see `vue-web-component-wrapper` in action:
- **Webpack implentaion**: Check out this [Webpack Demo Project](https://stackblitz.com/edit/vue-web-component-wrapper?file=README.md&startScript=webpack-demo)
- **Vite.js implentaion**: Check out this [Vite Demo Project](https://stackblitz.com/edit/vue-web-component-wrapper?file=README.md&startScript=vite-demo)



## Documentation
Check out the [Docs](https://erangrin.github.io/vue-web-component-wrapper)
See [Docs](https://erangrin.github.io/vue-web-component-wrapper)

## Key Features:
- **Vue Plugins Compatibility**: Seamlessly integrates with Vue ecosystem plugins such as Vuex, Vue Router, and Vue I18n.
Expand All @@ -41,6 +43,13 @@ Check out the [Docs](https://erangrin.github.io/vue-web-component-wrapper)
- **Disable Shadow DOM**: Disable shadow DOM for web components.


## CSS Frameworks Examples
- **Tailwind CSS** - [Demo](https://stackblitz.com/edit/vue-web-component-wrapper?file=README.md&startScript=tailwind-demo)
- **UnoCSS** - [Demo](https://stackblitz.com/~/github.com/EranGrin/element-plus-unocss-web-component?file=src/style.css:L1-L2)
- **Vuetify** - [Demo](https://stackblitz.com/~/github.com/EranGrin/vuetify-web-component-wrapper)
- **Element Plus** - [Demo](https://stackblitz.com/~/github.com/EranGrin/element-plus-unocss-web-component?file=src/style.css:L1-L2)
See documentation for more details [Docs](https://erangrin.github.io/vue-web-component-wrapper)

## Installation

```bash
Expand Down Expand Up @@ -301,7 +310,7 @@ customElements.define('my-component', MyComponentElement)
## Future Plans

1. **TypeScript Support**: Adding proper strict types.
2. **Vuetify Example**: Adding an example usage with Vuetify.



## Contributing
Expand Down
63 changes: 63 additions & 0 deletions docs/vuetify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
## Demo
https://stackblitz.com/~/github.com/EranGrin/vuetify-web-component-wrapper

## Usage

1. **Install Vuetify**:
```bash
npm install vuetify
```
or
```bash
yarn add vuetify
```
2. **Create the vutify plugin configuration file**:
```javascript
// Styles
import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/styles'
// Composables
import { createVuetify } from 'vuetify'
export default createVuetify({
theme: {
defaultTheme: 'dark',
},
})
```
3. **Add the plugin to the plugins warpper**:
```javascript
import vuetify from './vuetify'
export const pluginsWrapper = {
install(GivenVue: any) {
const Vue = GivenVue
Vue.use(vuetify)
}
}
```
4. **Create style.css file**:
```css
@import 'vuetify/dist/vuetify.min.css';
```
you can add any global css to this file
5. **Import the style.css file with ?inline**:<br>
```javascript
import style from './style.css?inline';
```
6. **Create your web component** passing the style variable as the cssFrameworkStyles option:<br>
```javascript
createWebComponent({
rootComponent: App,
elementName: 'my-web-component',
plugins: pluginsWrapper,
cssFrameworkStyles: style,
VueDefineCustomElement,
h,
createApp,
getCurrentInstance,
disableStyleRemoval: false,
});
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-web-component-wrapper",
"version": "1.6.2",
"version": "1.6.3",
"description": "A Vue 3 plugin that provides a web component wrapper with styles, seamlessly integrating with Vuex, Vue Router, Vue I18n, and supporting Tailwind CSS and Sass styles.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-web-component-wrapper",
"version": "1.6.2",
"version": "1.6.3",
"description": "A Vue 3 plugin that provides a web component wrapper with styles, seamlessly integrating with Vuex, Vue Router, Vue I18n, and supporting Tailwind CSS and Sass styles.",
"types": "types.d.ts",
"repository": {
Expand Down

0 comments on commit 2fea0c9

Please sign in to comment.