npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@iskl/ts-lib-template

v0.4.0

Published

一个 ts lib 的模板仓库,可以当做脚手架使用。

Downloads

4

Readme

一个 ts lib 的模板仓库,可以当做脚手架使用。

  1. 支持单元测试与覆盖率统计
  2. 使用 standard-version 或者 github action 升级版本号,产生 changelog
  3. 使用 typedoc 生成文档
  4. conventional commit 的校验支持
  5. 代码美化与语法检查的支持,以及相应的 git hooks 自动化支持

开发之前

  1. 修改package.json的模块信息,模块名、作者和描述。
  2. 删除 CHANGELOG.md
  3. 修改 README.md

非 github 项目

使用 standard-version 来升级版本号,然后需要手动发布。

  1. 删除.github 目录
  2. 删除 doc:publish 命令
  3. 删除 gh-pages 依赖包

github 项目

使用 github action 自动化发布

  1. 删除 npm version 命令
  2. 删除 standard-version 依赖包
  3. 在 github 项目配置 secrets:key 为 NPM_TOKEN,value 为 npm 的 token
  4. 修改 github workflows 里面的 package-name(改成和 package.json 的 name 一样)
  5. 在 github 仓库到 Settings > Code and automation > Actions > General > Workflow permissions, 打开 Allow GitHub Actions to create and approve pull requests.

开发与发布

开发

# 有变化就重新编译
npm run watch:build
# 有变化的时候使用编译过的代码进行测试
npm run watch:test

发布

github 项目:

只要遵循 comventional commit 约定的提交,push 到 github 之后,会自动产生 merge request,合并之后就会自动发布

非 github 项目:

# 发布前准备,会编译、测试以及升级版本号,产生changlog
npm run prepare-release
# 推送标签和代码
git push --follow-tags origin main
# 发布到npm
npm publish

参考仓库

  1. https://github.com/bitjson/typescript-starter