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

uni-publish-check

v1.0.7

Published

used for project publish check, espectially for uni-app project

Downloads

6

Readme

如何使用

1. Install

npm i -D uni-publish-check

or 全局安装

npm i -g uni-publish-check

2. 使用

安装在项目里面,则运行:
npx uni-publish-check
若安装在全局,则去掉npx即可
2.1 Overview
  • 提供 2 个通过注释的形式存在的指令:@check [表达式]@check-version [表达式] 此表达式中通过$0来代表实际的版本号
  • @check-version 中的$0 代表的版本号来源于:manifest.json 中的 versionName;若无则获取 package.json 中的 version
  • 指令扫描时,只处理后缀为:/\.(jsx?|vue|tsx?|java)$/文件
  • 本命令默认忽略:
隐藏文件、node_modules文件夹、xxx.md、static文件夹、certificate文件夹、dist文件夹、manifest.json
2.1 @check
// @check const isDev = false;
const isDev = true;

效果:将@check 的下一行的内容 替换为@check 之后的内容

2.2 @check-version
// @check-version const appVersion = '有新版本$0更新啦'
const appVersion = '有新版本1.0.0更新啦'

效果:命令会先将$0 替换为 uni-app 项目的 manifest.json 中的 versionName 的值;若无则获取 package.json 中的 version 字段; 然后将@check-version 的下一行替换为@check-version 之后的内容

2.3 命令内部自动检测

若检测到 manifest.json,说明是 uni-app 的项目;则会自动检测 1)iOS 的常用隐私信息是否填写, 2)检测是否使用了 IDFA(帮助发包苹果审核时,选择是否使用了 IDFA); 3)检测是否开通了推送 若是 则自动提醒去 dcloud 后台检查 iOS 推送证书是否配置正确

2.4 自动检测代码中是否存在 TODO 注释

发布前运行[npx] uni-publish-check(px:[]表示可选 取决于是否是局部安装),将检测文件中是否有 TODO 存在 以免遗漏发布上线了。