mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
add vuejs wrapper for component.
This commit is contained in:
parent
c48caf32eb
commit
1def45f2a1
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@demodesk/neko",
|
||||
"version": "0.1.1",
|
||||
"version": "1.1.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
16
package.json
16
package.json
@ -2,15 +2,6 @@
|
||||
"name": "@demodesk/neko",
|
||||
"version": "1.1.0",
|
||||
"description": "Client as reusable Vue.js component for neko streaming server.",
|
||||
"main": "dist/neko.umd.js",
|
||||
"module": "dist/neko.common.js",
|
||||
"unpkg": "dist/neko.min.js",
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
"browser": {
|
||||
"./sfc": "src/component/main.vue"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/demodesk/neko/client.git"
|
||||
@ -18,10 +9,12 @@
|
||||
"bugs": {
|
||||
"url": "https://gitlab.com/demodesk/neko/client/-/issues"
|
||||
},
|
||||
"main": "dist/neko.umd.js",
|
||||
"module": "dist/neko.common.js",
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve --mode development",
|
||||
"lint": "vue-cli-service lint",
|
||||
"build": "vue-cli-service build --target lib --name neko ./src/component/main.vue"
|
||||
"build": "vue-cli-service build --target lib --name neko ./src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.15.1",
|
||||
@ -55,6 +48,9 @@
|
||||
"typescript": "^4.0.5",
|
||||
"vue-template-compiler": "^2.6.12"
|
||||
},
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
|
22
src/index.ts
Normal file
22
src/index.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import Vue from 'vue';
|
||||
import Neko from './component/main.vue'
|
||||
|
||||
/**
|
||||
* Fügt eine "install" function hinzu
|
||||
*
|
||||
* Weitere Infos:
|
||||
* https://vuejs.org/v2/cookbook/packaging-sfc-for-npm.html#Packaging-Components-for-npm
|
||||
*/
|
||||
const NekoElements = {
|
||||
install(vue: typeof Vue): void {
|
||||
vue.component('Neko', Neko);
|
||||
},
|
||||
};
|
||||
|
||||
if (typeof window !== 'undefined' && window.Vue) {
|
||||
// @ts-ignore
|
||||
window.Vue.use(NekoElements, {});
|
||||
}
|
||||
|
||||
export { Neko };
|
||||
export default NekoElements;
|
Loading…
Reference in New Issue
Block a user