package.json 字段:
module:’es/index.js’ 指定esmodule读取的入口文件
tsconfig.json 字段:
“declaration”: true, // 生成 .d.ts
“declarationMap”: true, // 生成 .d.ts的map文件
tsconfig 只设置 incluede 字段,以表示哪些文件是需要检查或需要打包的文件,不需要使用exclude.
每个包下使用tsconfig.include用于表示需要eslint检查的文件。
不需要检查的文件,直接在全局.eslintignore中配置即可
若要发布@xx/saa类型的包,需要先创建xxscope,在npm settings中可以创建