knight-web 2.0.0 → 2.0.1
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/index.d.ts
CHANGED
package/package.json
CHANGED
|
Binary file
|
package/readme.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# node包发布流程
|
|
2
|
-
1、在架构工程下使用rollup打包,生成dist文件,导入此工程中;
|
|
3
|
-
2、使用"npm init -y"语句初始化package.json,并设置其中的包名、版本、描述等参数;
|
|
4
|
-
|
|
5
|
-
# 检查 npm 源(非官方源需切换)
|
|
6
|
-
npm config get registry
|
|
7
|
-
# 切换为官方源
|
|
8
|
-
npm config set registry https://registry.npmjs.org/
|
|
9
|
-
# 登录账号(按提示输入用户名、密码、邮箱)
|
|
10
|
-
在npm官网注册账号,在新终端输入"npm login"。
|
|
11
|
-
登录成功后可通过 npm whoami 验证当前登录用户。
|
|
12
|
-
在命令执行语句将token配置到环境变量:
|
|
13
|
-
npm config set //registry.npmjs.org/:_authToken=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
|
|
14
|
-
查看配置是否生效:
|
|
15
|
-
npm config get //registry.npmjs.org/:_authToken
|
|
16
|
-
## 退出账号
|
|
17
|
-
npm logout
|
|
18
|
-
## 清除缓存
|
|
19
|
-
npm cache clean --force
|
|
20
|
-
## 查看登录用户(测试认证)
|
|
21
|
-
npm whoami
|
|
22
|
-
# 发布"npm publish",此命令会直接将此工程中的包根据package.json的配置进行发布,等待发布成功;
|
|
23
|
-
|
|
24
|
-
# node包卸载流程
|
|
25
|
-
1、"npm unpublish <包名> -force";
|
|
26
|
-
|
|
27
|
-
# npm 相关指令
|
|
28
|
-
1、临时使用国内镜像 npm install node-sass --registry=http://registry.npm.taobao.org
|
|
29
|
-
2、永久改成国内镜像 npm config set registry https://registry.npm.taobao.org
|
|
30
|
-
3、查询当前使用的npm配置 npm config list
|
|
31
|
-
4、有时候使用国内镜像还是会出现下载超时的问题,可以通过清除缓存后再次尝试 npm cache clean --force
|
|
32
|
-
|
|
33
|
-
# 操作教程
|
|
34
|
-
https://blog.csdn.net/Y2ANGAO/article/details/156058804
|
|
35
|
-
# 2Fa验证新操作
|
|
36
|
-
https://blog.ahzoo.cn/p/78112aa/
|