Skip to content

Commit d309573

Browse files
committed
build: fixing build issues
1 parent 0ae8dc6 commit d309573

File tree

11 files changed

+68
-65
lines changed

11 files changed

+68
-65
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Vue.use(Particles);
2929
```html
3030
<template>
3131
<div id="app">
32-
<Particles
32+
<vue-particles
3333
id="tsparticles"
3434
:particlesInit="particlesInit"
3535
:particlesLoaded="particlesLoaded"
@@ -38,7 +38,7 @@ Vue.use(Particles);
3838

3939
<!-- or -->
4040

41-
<Particles
41+
<vue-particles
4242
id="tsparticles"
4343
:particlesInit="particlesInit"
4444
:particlesLoaded="particlesLoaded"

apps/vue2/.babelrc

+26-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
{
2-
"plugins": [
3-
[
4-
"@babel/proposal-decorators",
5-
{
6-
"legacy": true
7-
}
8-
],
9-
[
10-
"@babel/proposal-class-properties",
11-
{
12-
"loose": true
13-
}
14-
]
2+
"plugins": [
3+
[
4+
"@babel/proposal-decorators",
5+
{
6+
"legacy": true
7+
}
8+
],
9+
[
10+
"@babel/proposal-class-properties",
11+
{
12+
"loose": true
13+
}
14+
],
15+
[
16+
"@babel/plugin-transform-private-methods",
17+
{
18+
"loose": true
19+
}
20+
],
21+
[
22+
"@babel/plugin-transform-private-property-in-object",
23+
{
24+
"loose": true
25+
}
1526
]
16-
}
27+
]
28+
}

apps/vue2/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"babel-loader": "^8.3.0",
4545
"eslint": "^8.44.0",
4646
"eslint-config-prettier": "^8.8.0",
47+
"fork-ts-checker-webpack-plugin": "^8.0.0",
4748
"postcss": "^8.4.26",
4849
"prettier": "^3.0.0",
4950
"rollup": "^2.79.1",

apps/vue2/rollup.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import vue from 'rollup-plugin-vue';
2-
import typescript from 'rollup-plugin-typescript';
2+
import typescript from 'rollup-plugin-typescript2';
33
import json from '@rollup/plugin-json';
44
import {terser} from 'rollup-plugin-terser';
55

apps/vue2/src/App.vue

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
<template>
22
<div id="app">
33
<img alt="Vue logo" src="./assets/logo.png"/>
4-
<Particles id="tsparticles" :options="options" :particlesInit="particlesInit"/>
4+
<vue-particles id="tsparticles" :options="options" :particlesInit="particlesInit"/>
55
</div>
66
</template>
77

88
<script lang="ts">
99
import { Vue } from "vue-property-decorator";
1010
import type { Engine } from "tsparticles-engine";
1111
import { loadFull } from "tsparticles";
12-
import { basic } from "tsparticles-demo-configs";
13-
14-
import Particles from "vue2-particles";
15-
16-
Vue.use(Particles);
12+
import configs from "tsparticles-demo-configs";
1713
1814
export default class App extends Vue {
19-
options = basic;
15+
options = configs.basic;
2016
2117
async particlesInit(engine: Engine) {
2218
await loadFull(engine);

apps/vue2/src/main.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import Vue from 'vue'
22
import App from './App.vue'
3+
import Particles from "vue2-particles";
34

45
Vue.config.productionTip = false
56

7+
8+
Vue.use(Particles);
9+
610
new Vue({
711
render: h => h(App),
812
}).$mount('#app')

components/vue2-alt/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Vue.use(Particles);
2929
```html
3030
<template>
3131
<div id="app">
32-
<Particles
32+
<vue-particles
3333
id="tsparticles"
3434
:particlesInit="particlesInit"
3535
:particlesLoaded="particlesLoaded"
@@ -38,7 +38,7 @@ Vue.use(Particles);
3838

3939
<!-- or -->
4040

41-
<Particles
41+
<vue-particles
4242
id="tsparticles"
4343
:particlesInit="particlesInit"
4444
:particlesLoaded="particlesLoaded"

components/vue2-alt/src/Particles/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import Vue from "vue";
22
import particles from "./Particles.vue";
33

44
const VueParticles = {
5-
install: (vue: typeof Vue, options: unknown) => {
5+
install: (vue: typeof Vue) => {
66
vue.component("Particles", particles);
7+
vue.component("vue-particles", particles);
78
},
89
};
910

components/vue2/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Vue.use(Particles);
2929
```html
3030
<template>
3131
<div id="app">
32-
<Particles
32+
<vue-particles
3333
id="tsparticles"
3434
:particlesInit="particlesInit"
3535
:particlesLoaded="particlesLoaded"
@@ -38,7 +38,7 @@ Vue.use(Particles);
3838

3939
<!-- or -->
4040

41-
<Particles
41+
<vue-particles
4242
id="tsparticles"
4343
:particlesInit="particlesInit"
4444
:particlesLoaded="particlesLoaded"

components/vue2/src/Particles/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import Vue from "vue";
22
import particles from "./Particles.vue";
33

44
const VueParticles = {
5-
install: (vue: typeof Vue, options: unknown) => {
5+
install: (vue: typeof Vue) => {
66
vue.component("Particles", particles);
7+
vue.component("vue-particles", particles);
78
},
89
};
910

pnpm-lock.yaml

+23-35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)