tms-auth 1.2.101-dev → 1.3.0-dev

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 CHANGED
@@ -8,25 +8,10 @@
8
8
 
9
9
  # tms-auth
10
10
 
11
- ## 启动项目
11
+ ## 文档
12
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
- ```
13
+ - [业务系统对接 TMS(前端)](https://www.tapd.cn/38213767/markdown_wikis/show/#1138213767001002488)
14
+ - [TMS Auth 文档](https://chatlabs-tms-doc.chatlabs.net/)
30
15
 
31
16
  ### 本地调试
32
17
 
@@ -60,34 +45,41 @@ $ npm run dev
60
45
 
61
46
  ## 发布到 dev / uat / live 环境
62
47
 
48
+ 运行自定义的脚本
49
+
63
50
  ```bash
64
- $ npm run pubilsh (dev|uat|live)
51
+ npm run pubilsh (dev|uat|live)
65
52
  ```
66
53
 
67
- dev 环境打包后会在 tms-dist-dev uat 环境打包后会在 tms-dist-uat live 环境打包后会在 tms-dist
54
+ 运行命令会提示如下内容: ? 重新打包? yarn run build (默认 Y) N ? 当前版本号是 xxx,自动增加编号,是否让新版本号为 xxx? ? 打包后上传至 Bitbucket 仓库的 tms-dist-xxx 分支 ? 在 Bitbucket 分支上 打 Tag 标签 ? 打包后发布至 NPM 包
68
55
 
69
- 项目在 package.json 中根据需求引入不同的环境变量,分别是:
56
+ | 环境 | npm | bitbucket | 备注 |
57
+ | :--- | :---------------------------------- | :----------- | :--- |
58
+ | dev | tms-auth@dev | tms-dist-dev | |
59
+ | uat | tms-auth@uat | tms-dist-uat | |
60
+ | live | tms-auth<br/>或<br/>tms-auth@latest | tms-dist | |
70
61
 
71
- ```
72
- "tms-auth": "git+https://bitbucket.org/chatly-biz-tool/tms-auth.git#tms-dist-dev"
73
- ```
62
+ ##### 引入 npm 包(可支持引入不同环境)
74
63
 
75
64
  ```
76
- "tms-auth": "git+https://bitbucket.org/chatly-biz-tool/tms-auth.git#tms-dist-uat"
65
+ yarn add tms-auth@latest
77
66
  ```
78
67
 
68
+ ##### 引入 bitbucket 仓库(可支持引入不同环境,最后的分支名称即可)
69
+
79
70
  ```
80
- "tms-auth": "git+https://bitbucket.org/chatly-biz-tool/tms-auth.git#tms-dist"
71
+ yarn add git+https://bitbucket.org/chatly-biz-tool/tms-auth.git#tms-dist
81
72
  ```
82
73
 
83
- 或者直接引入 npm 包 yarn add tms-auth@dev yarn add tms-auth@uat yarn add tms-auth
74
+ ## 其他记录
84
75
 
85
- #### 发布失败的原因
76
+ #### 发布到 npm 包 步骤
86
77
 
87
- 1.网络原因:重新发布 2.其他原因:删除 nodemoudles 下的.cache 文件(一般是发布过其他环境后容易出现这个问题)
78
+ 1. 设置源 npm config set registry https://registry.npmjs.org/
79
+ 2. 无权限时先登录 npm 账号:npm login(通过网页授权)
80
+ 3. 发布:npm publish 或运行终端提示的命令 比如 ` npm publish ./dist-to-npm --tag dev `
81
+ 4. 无发布权限,可去[创建 Token](https://www.npmjs.com/settings/chatlabs-frontend/tokens/granular-access-tokens/new)绕过检测,【前端公共账号】处有截图显示步骤
88
82
 
89
- ### 发布到 npm 包
83
+ #### bitbucket 发布失败的原因
90
84
 
91
- 1. 设置源 npm config set registry https://registry.npmjs.org/
92
- 2. 登录 npm 账号:npm login
93
- 3. 发布:npm publish
85
+ 1.网络原因:重新发布 2.其他原因:删除 nodemoudles 下的.cache 文件(一般是发布过其他环境后容易出现这个问题)
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"tms-auth","version":"1.2.101-dev","description":"TMS Auth from NPM","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.3.0-dev","description":"TMS Auth from NPM","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"}