npm init -y
tsc --init
tsc // tsc test.ts 可以指定文件
node // node text.js
npm login
npm publish
- 如果 on 后面不是 https://registry.npmjs.org/ ,而是其他的镜像,比如我们大家常见的淘宝镜像: https://registry.npm.taobao.org/,则需替换成原来的,对应命令
npm config set registry https://registry.npmjs.org/