@x-edu/service 0.0.12 → 0.0.13

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.
Files changed (2) hide show
  1. package/README.md +38 -0
  2. package/package.json +7 -2
package/README.md CHANGED
@@ -0,0 +1,38 @@
1
+ # @x-edu/service
2
+ x 学习相关 API
3
+
4
+ ## 安装
5
+ ```bash
6
+ npm i @x-edu/service
7
+ ```
8
+
9
+ ## 示例
10
+ ```js service.js
11
+ import Service from '@x-edu/service'
12
+
13
+ export let service
14
+
15
+ export function initService({
16
+ uc,
17
+ sdpAppId
18
+ }) {
19
+ service = new Service({
20
+ uc,
21
+ sdpAppId
22
+ })
23
+ return service
24
+ }
25
+ ```
26
+
27
+ ```js app.js
28
+ const uc = new UC()
29
+ const sdpAppI = 'xxxx'
30
+
31
+ initService({ uc, sdpAppId })
32
+ ```
33
+
34
+ ```js biz.js
35
+ import { service as serviceInstance } from '@/service'
36
+
37
+ serviceInstance.service.xxx()
38
+ ```
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@x-edu/service",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
+ "description": "x学习服务",
5
+ "repository": "https://gitlab.ndaeweb.com/x-edu/x-edu-sdk",
6
+ "author": "郭延豪(708674)",
4
7
  "main": "dist/service.js",
5
8
  "module": "dist/service.mjs",
6
9
  "types": "dist/index.d.ts",
@@ -21,7 +24,8 @@
21
24
  "clean": "rimraf dist node_modules",
22
25
  "release": "release-it",
23
26
  "beforepublish": "node ../../scripts/publish_backup.js",
24
- "afterpublish": "node ../../scripts/publish_recover.js"
27
+ "afterpublish": "node ../../scripts/publish_recover.js",
28
+ "postpublish": "xem publish"
25
29
  },
26
30
  "publishConfig": {
27
31
  "access": "public",
@@ -46,6 +50,7 @@
46
50
  },
47
51
  "devDependencies": {
48
52
  "@types/node": "^18.15.13",
53
+ "@x-edu/material-cli": "^0.0.3",
49
54
  "husky": "^7.0.4",
50
55
  "lint-staged": "^7.3.0",
51
56
  "vite": "^5.1.4",