JSPM

weapp-xmlhttprequest

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q15754F
  • License MIT

weapp-xmlhttprequest

Package Exports

  • weapp-xmlhttprequest
  • weapp-xmlhttprequest/dist/index.js
  • weapp-xmlhttprequest/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (weapp-xmlhttprequest) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm-lib-rollup-template

codecov

本人用于编写的一个 npm 包的一个模板

  • 使用 rollup 打包 (兼容 tsc)
  • 使用 jest vitest 作为单元测试框架
  • 使用 eslint 来规范代码风格,默认风格为 standard
  • 输出 dist -> cjs,esm and .d.ts
  • 使用 semantic-release 来发布 npm/github

为什么使用 vitest 而不是原先的 jest

vitest 开箱即用,jest 在同时遇到 cjsesm 依赖的时候,支持很差,经常会失败,而且配置复杂,依赖的 preset 多,比如 ts-jest..

scripts

rename

执行 npm run init:rename

作用为替换 package.json 中默认包含的所有名称为 npm-lib-rollup-template 的字段

默认替换为新建代码仓库的文件夹名称!

bin

执行 npm run init:bin

作用为 package.json 添加 filesbin,同时生成 bin/{{pkg.name}}.jssrc/cli.ts 文件