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

@rx-frontend/uni-cli

v0.8.1

Published

对`uni-app`命令行的增强,兼容uni2和uni3

Downloads

17

Readme

@rx-frontend/uni-cli

uni-app命令行的增强,兼容uni2和uni3

使用

安装

pnpm i -D @rx-frontend/uni-cli
yarn add -D @rx-frontend/uni-cli
npm i -D @rx-frontend/uni-cli

支持的环境变量

| 名称 | 说明 | | --- | ---- | | UNI_CLI_VERSION | 微信公众平台发布的版本号 | | UNI_CLI_DEPLOY_NOTIFY | 部署结果的通知webhook | | UNI_CLI_DEPLOY_REBOT | 微信公众平台发布机器人编号 |

基本用法

uni-cli -p mp-weixin --open

uni-cli deploy # 需要在配置文件中配置appid等变量

vue-cli-service中压缩代码使用--minimize,而在vite中使用--minify

uni-cli中统一使用--minify,但是当运行在vue-cli-service中,压缩插件无法修改,只能是terser

配置文件

支持的文件名:cli.config.js,cli.config.mjs,cli.config.ts,cli.config.cjs,cli.config.mts,cli.config.cts

import { defineConfig } from '@rx-frontend/uni-cli'

export default defineConfig({
  env: {
    appid: 'appid'
  }
})

| 名称 | 类型 | 默认值 | 说明 | | --- | --- | ----- | ----- | | root | string | process.cwd() | 项目的根目录 | | base | string | 'scripts' | 上传密钥的保存目录 | | env | Array | Object | - | 环境配置 | | exclude | string[] | - | deploy --all时排除的环境,不影响deploy --name | include | string[] | - | deploy --all时指定上传的环境,不影响deploy --name

excludeinclude同时只允许设置一项

环境配置

| 名称 | 类型 | 是否必填 | 默认值 | 说明 | | ---- | --- | :-----: | --- | ---- | | name | string | ✔ | - | 小程序环境的名称,需要与--env保持一致 | | appid | string | ✔ | - | 小程序的appid,构建完成后会被写入到project.config.json中 | | key | string | ❌ | - | 如果不需要自动上传,可以不填 | | title | string | ❌ | - | 小程序中展示的项目名称{title}({NODE_ENV}) | | output | string | ❌ | dist/{dev/prod}/{platform} |小程序构建输出的目录位置,如果代码中有环境的区分,请务必设置 | | buildCmd | string | ❌ | - | 如果需要自动上传,请务必填写 | | processEnv | Record<string, string> | ❌ | - | 所有的键值对都会被绑定到process.env上| | alias | string | ❌ | - | --env设置的name的别名

关于appid

如果不设置appid就需要在项目根目录中的src/manifest.json中配置

关于buildCmd

buildCmd默认会添加当前所在环境的name作为参数--env {name}