nuxt-callapp 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/dist/module.json +5 -1
- package/dist/runtime/call-app.d.ts +2 -2
- package/dist/runtime/{call-app.mjs → call-app.js} +6 -4
- package/package.json +34 -11
package/README.md
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Find and replace all on all files (CMD+SHIFT+F):
|
|
5
|
-
- Name: My Module
|
|
2
|
+
- Name: Nuxt CallApp
|
|
6
3
|
- Package name: nuxt-callapp
|
|
7
|
-
- Description:
|
|
4
|
+
- Description: A nuxt module for [callapp-lib]
|
|
8
5
|
-->
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<img width="180" src="./assets/callapp.svg" alt="callapp logo">
|
|
9
|
+
</p>
|
|
11
10
|
|
|
12
11
|
[![npm version][npm-version-src]][npm-version-href]
|
|
13
12
|
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
14
13
|
|
|
14
|
+
# Nuxt CallApp
|
|
15
|
+
|
|
15
16
|
A nuxt module for [callapp-lib](https://github.com/suanmei/callapp-lib)
|
|
16
17
|
|
|
17
18
|
- [✨ Release Notes](/CHANGELOG.md)
|
package/dist/module.json
CHANGED
|
@@ -5,12 +5,12 @@ export default _default;
|
|
|
5
5
|
declare module '#app' {
|
|
6
6
|
interface NuxtApp {
|
|
7
7
|
$createCallApp(options: CallappOptions): CallApp;
|
|
8
|
-
$useCallApp(
|
|
8
|
+
$useCallApp(config: CallappConfig, callback?: (instance: CallApp) => void): void;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
declare module 'vue' {
|
|
12
12
|
interface ComponentCustomProperties {
|
|
13
13
|
$createCallApp(options: CallappOptions): CallApp;
|
|
14
|
-
$useCallApp(
|
|
14
|
+
$useCallApp(config: CallappConfig, callback?: (instance: CallApp) => void): void;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { defineNuxtPlugin, useRuntimeConfig } from "#imports";
|
|
2
1
|
import CallApp from "callapp-lib";
|
|
2
|
+
import { defineNuxtPlugin, useRuntimeConfig } from "#imports";
|
|
3
3
|
let callApp;
|
|
4
4
|
function createCallApp(options) {
|
|
5
5
|
return new CallApp(options);
|
|
6
6
|
}
|
|
7
|
-
function useCallApp(
|
|
7
|
+
function useCallApp(config, callback) {
|
|
8
8
|
const options = useRuntimeConfig().public.callapp;
|
|
9
9
|
if (!callApp) {
|
|
10
10
|
callApp = new CallApp(options);
|
|
11
11
|
}
|
|
12
12
|
if (callback) {
|
|
13
|
-
|
|
13
|
+
config.callback = () => {
|
|
14
|
+
callback(callApp);
|
|
15
|
+
};
|
|
14
16
|
}
|
|
15
|
-
callApp.open(
|
|
17
|
+
callApp.open(config);
|
|
16
18
|
}
|
|
17
19
|
export default defineNuxtPlugin({
|
|
18
20
|
name: "callapp-plugin",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-callapp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "A Nuxt module for callapp-lib",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "xjccc",
|
|
@@ -35,26 +35,49 @@
|
|
|
35
35
|
"dev": "nuxi dev playground",
|
|
36
36
|
"dev:build": "nuxi build playground",
|
|
37
37
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
38
|
-
"release": "npm run lint && npm run test && npm run prepack &&
|
|
38
|
+
"release": "changelogen --release && npm run lint && npm run test && npm run prepack && npm publish && git push --follow-tags",
|
|
39
|
+
"echo:husky": "echo 'npx lint-staged' > .husky/pre-commit && echo 'npx --no-install commitlint --edit \"$1\"' > .husky/commit-msg",
|
|
39
40
|
"lint": "eslint .",
|
|
41
|
+
"lint:fix": "eslint . --fix",
|
|
42
|
+
"prepare": "husky",
|
|
43
|
+
"commit": "git-cz",
|
|
40
44
|
"test": "vitest run",
|
|
41
45
|
"test:watch": "vitest watch"
|
|
42
46
|
},
|
|
47
|
+
"config": {
|
|
48
|
+
"commitizen": {
|
|
49
|
+
"path": "node_modules/cz-git"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
43
52
|
"dependencies": {
|
|
44
|
-
"@nuxt/kit": "^3.
|
|
53
|
+
"@nuxt/kit": "^3.11.2",
|
|
45
54
|
"callapp-lib": "^3.5.3",
|
|
46
55
|
"defu": "^6.1.4"
|
|
47
56
|
},
|
|
48
57
|
"devDependencies": {
|
|
58
|
+
"@commitlint/cli": "^19.3.0",
|
|
59
|
+
"@commitlint/config-conventional": "^19.2.2",
|
|
49
60
|
"@nuxt/devtools": "latest",
|
|
50
|
-
"@nuxt/eslint-config": "^0.
|
|
51
|
-
"@nuxt/module-builder": "^0.
|
|
52
|
-
"@nuxt/schema": "^3.
|
|
53
|
-
"@nuxt/test-utils": "^3.
|
|
54
|
-
"@types/node": "^20.
|
|
61
|
+
"@nuxt/eslint-config": "^0.3.13",
|
|
62
|
+
"@nuxt/module-builder": "^0.7.0",
|
|
63
|
+
"@nuxt/schema": "^3.11.2",
|
|
64
|
+
"@nuxt/test-utils": "^3.13.1",
|
|
65
|
+
"@types/node": "^20.12.12",
|
|
55
66
|
"changelogen": "^0.5.5",
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
67
|
+
"commitizen": "^4.3.0",
|
|
68
|
+
"cz-git": "^1.9.1",
|
|
69
|
+
"eslint": "^9.3.0",
|
|
70
|
+
"husky": "^9.0.11",
|
|
71
|
+
"lint-staged": "^15.2.5",
|
|
72
|
+
"nuxt": "^3.11.2",
|
|
73
|
+
"vitest": "^1.6.0"
|
|
74
|
+
},
|
|
75
|
+
"husky": {
|
|
76
|
+
"hooks": {
|
|
77
|
+
"pre-commit": "lint-staged"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"lint-staged": {
|
|
81
|
+
"*": "eslint . --fix"
|
|
59
82
|
}
|
|
60
83
|
}
|