test-array-map-hbt
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

步骤

  1. yarn init -y
  2. tsc --init
  3. yarn add typescript -D
  4. 写代码
  5. tsc
  6. npm login
    • username
    • password
    • emai
  7. 添加 .npmignorewen 文件(node_modules 自动忽略)
  8. npm publish

笔记

  1. 需要在npm 官网注册账号
  2. 搜索自己想发的包是否已经在 npm 上存在了
  3. 创建项目
    • main:入口文件,指定别人引用我们发布的包时候真正引用的文件
  4. tsconfig 配置
    • exclude:排除的文件夹
    • compilerOptions
      • declaration:是否自动生成 .d.ts 文件
      • outDir:输出目录

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i test-array-map-hbt

      Weekly Downloads

      2

      Version

      1.0.0

      License

      MIT

      Unpacked Size

      8.47 kB

      Total Files

      7

      Last publish

      Collaborators

      • herbert-hbt