tms-auth 1.2.70-dev.0 → 1.2.72-dev.2

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 ADDED
@@ -0,0 +1,91 @@
1
+ <!--
2
+ * @Author : cynthiali@chatlabs.com
3
+ * @Date : 2025-04-25 11:15:50
4
+ * @LastEditors : cynthiali@chatlabs.com
5
+ * @LastEditTime : 2025-05-21 15:35:50
6
+ * @FilePath : /tms-auth/README.md
7
+ -->
8
+
9
+ # tms-auth
10
+
11
+ ## 启动项目
12
+
13
+ 安装依赖
14
+
15
+ ```bash
16
+ $ npm i
17
+ ```
18
+
19
+ Start the dev server,
20
+
21
+ ```bash
22
+ $ npm start
23
+ ```
24
+
25
+
26
+
27
+ ```bash
28
+ $ npm run dev
29
+ ```
30
+
31
+ ### 本地调试
32
+
33
+ 1. 用 npm run dev 启动项目后
34
+ 2. 运行 npm link 或 yarn link
35
+ 3. 在本地的项目 A 中运行 npm link tms-auth 或 yarn link tms-auth 即可调试
36
+
37
+ #### 注意事项
38
+
39
+ ##### 提示 react 版本升级为 17 问题
40
+
41
+ 用 yarn link 和 yarn link tms-auth
42
+
43
+ ##### 当前项目修改的数据如遇到 link 失败问题
44
+
45
+ 1. 可以试试先把`本地的项目A`的 node_modules 删掉
46
+ 2. 再执行一下命令 npm link tms-auth --legacy-peer-deps 或 npm link tms-auth --force
47
+
48
+ ##### 若运行后项目 A 提示 css 文件引入问题
49
+
50
+ ###### 方案 1
51
+
52
+ 1. 把 @import '~tms-auth/index.css'; 改为 @import '~tms-auth/dist/index.css';
53
+
54
+ ###### 方案 2
55
+
56
+ 临时方案:直接在项目 A 中复制 CSS 文件 ​​,手动复制 tms-auth 的 CSS 文件到项目 A 中:
57
+
58
+ - 2.1 复制 node_modules/tms-auth/dist/index.css 到 src/assets/css/
59
+ - 2.2 在项目中导入:`@import './assets/css/index.css';`
60
+
61
+ ## 发布到 dev / uat / live 环境
62
+
63
+ ```bash
64
+ $ npm run pubilsh (dev|uat|live)
65
+ ```
66
+
67
+ dev 环境打包后会在 tms-dist-dev uat 环境打包后会在 tms-dist-uat live 环境打包后会在 tms-dist
68
+
69
+ 项目在 package.json 中根据需求引入不同的环境变量,分别是:
70
+
71
+ ```
72
+ "tms-auth": "git+https://bitbucket.org/chatly-biz-tool/tms-auth.git#tms-dist-dev"
73
+ ```
74
+
75
+ ```
76
+ "tms-auth": "git+https://bitbucket.org/chatly-biz-tool/tms-auth.git#tms-dist-uat"
77
+ ```
78
+
79
+ ```
80
+ "tms-auth": "git+https://bitbucket.org/chatly-biz-tool/tms-auth.git#tms-dist"
81
+ ```
82
+
83
+ #### 发布失败的原因
84
+
85
+ 1.网络原因:重新发布 2.其他原因:删除 nodemoudles 下的.cache 文件(一般是发布过其他环境后容易出现这个问题)
86
+
87
+ ### 发布到 npm 包
88
+
89
+ 1. 设置源 npm config set registry https://registry.npmjs.org/
90
+ 2. 登录 npm 账号:npm login
91
+ 3. 发布:npm publish
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"tms-auth","version":"1.2.70-dev.0","main":"./index.js","module":"./index.js","types":"dist/index.d.ts","lint-staged":{"*.{js,jsx,less,md,json}":["prettier --write"],"*.ts?(x)":["prettier --parser=typescript --write"]},"peerDependencies":{"react":">=16.14.0","react-dom":">=16.14.0","umi":">=3.2.27"},"typings":"./index.d.ts"}
1
+ {"name":"tms-auth","version":"1.2.72-dev.2","main":"./index.js","module":"./index.js","types":"dist/index.d.ts","lint-staged":{"*.{js,jsx,less,md,json}":["prettier --write"],"*.ts?(x)":["prettier --parser=typescript --write"]},"peerDependencies":{"react":">=16.14.0","react-dom":">=16.14.0","umi":">=3.2.27"},"typings":"./index.d.ts"}