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

wx-tool-ci

v1.2.0

Published

基于miniprogram-ci插件开发的小程序上传、预览自动化工具

Downloads

16

Readme

小程序 ci 自动化工具

  • 基于miniprogram-ci插件开发的小程序上传、预览自动化工具

安装

使用npm:

npm i wx-tool-ci --save-dev

使用yarn:

yarn add wx-tool-ci -D

使用pnpm

pnpm install wx-tool-ci -D

也可全局安装【推荐】

npm install wx-tool-ci -g

使用

初始化生成配置文件

  • 简写i
wx-tool init

上传

  • 简写u
wx-tool upload

预览

  • 简写p
wx-tool preview

配置说明

具体配置详情:查看miniprogram-ci官方文档

ci.config.js配置

| 参数 | 描述 | 类型 | 必传 | 默认值 | | ---------------- | ------------------------------------------------------------ | ------ | ---- | ------------- | | appid | 小程序appid | string | 是 | | | type | 显示指明当前的项目类型 | string | 是 | miniProgram | | projectPath | 小程序生成目录 | string | 是 | dist | | privateKeyPath | 小程序钥匙目录【应访问"微信公众平台-开发 - 开发设置"后下载代码上传密钥】 | string | 否 | | | setting | 编译设置 | object | 否 | | | version | 小程序版本号 【如果未指定,默认取当前项目中的package.json的version,version默认1.0.0】 | object | 否 | | | projectOptions | 项目的自定义配置,和上面配置合并 | object | 否 | | | uploadOptions | 上传的自定义配置 | object | 否 | | | previewOptions | 预览自定义配置 | object | 否 | | | beforeCommand | 上传前执行脚本, 如上传之前进行打包 [{ command: 'pnpm build',desc: '打包'}] | array | 否 | | | afterCommand | 上传之后执行脚本 | array | 否 | |

默认配置表如下:

export default {
	// 小程序appid
	appid: '',
	// 显示指明当前的项目类型
	type: 'miniProgram',
	//小程序生成目录
	projectPath: 'dist',
	/**
	 * 小程序钥匙目录
	 * 使用 miniprogram-ci 前应访问"微信公众平台-开发 - 开发设置"后下载代码上传密钥
	 */
	privateKeyPath: '',
	// 编译设置
	setting: {
		es6: true,
		es7: false,
		// 上传时压缩 JS 代码
		minifyJS: false,
		// 上传时压缩 WXML 代码
		minifyWXML: false,
		// 上传时压缩 WXSS 代码
		minifyWXSS: false,
		// 上传时压缩所有代码,对应于微信开发者工具的 "上传时压缩代码"
		minify: true,
		// 对应于微信开发者工具的 "上传时进行代码保护"
		codeProtect: false,
		// 对应于微信开发者工具的 "上传时样式自动补全"
		autoPrefixWXSS: false,
	},
	// 小程序版本号, 如果未指定,默认取当前项目中的package.json的version,version默认1.0.0
	version: '',
	// 项目的自定义配置,和上面配置合并
	projectOptions: {},
	// 上传的自定义配置
	uploadOptions: {
		version: '',
		desc: '',
		// 编译设置
		setting: {
			es6: true,
		},
	},
	// 预览自定义配置
	previewOptions: {
		// 预览二维码文件保存路径
		qrcodeOutputDest: '/preview/destination.jpg',
	},
	/**
	 *  上传前执行脚本, 如上传之前进行打包
	 *  [{ command: 'pnpm build',desc: '打包'}]
	 */
	beforeCommand: [],
	// 上传之后执行脚本
	afterCommand: [],
};