🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@vyron/mini-ci

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@vyron/mini-ci

[![license](https://img.shields.io/npm/l/@vyron/mini-ci)](https://github.com/VFiee/mini-ci) [![npm version](https://img.shields.io/npm/v/@vyron/mini-ci.svg)](https://github.com/VFiee/mini-ci)

unpublished
latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

mini-ci

license npm version

mini-ci 基于miniprogram-ci开发,用于以配置管理多个小程序项目.

Table of Contents

安装

yarn

yarn global add @vyron/mini-ci

npm

npm install @vyron/mini-ci -g

配置

参考微信文档

项目配置

key默认值env类型必填说明
appid当前项目 project.config.jsonappid 字段appid / idstring小程序或小游戏的 appid
projectPathprojectPath / proPathstring项目源码路径
privateKeyPathprivateKeyPath / priPathstring小程序或小游戏代码上传密钥
typeminiProgramtype / tstring当前项目类型,有效值 miniProgram/miniProgramPlugin/miniGame/miniGamePlugin
ignoresignores / igstring[]指定忽略的规则
version项目及其上级三层目录的package.json里的versionverstring自定义版本号
desc当前本地时间desc / dstring自定义备注信息
robot1robot / bnumber指定 CI 机器人,可选值1~30 上传成功后将显示:ci 机器人 1
qrcodeFormatterminalqrcodeFormat / qrFormat/qrfstring预览返回二维码文件格式,可选值: image/base64/terminal
qrcodeOutputDest当前项目qrcodeOutputDest/qrDest / qrdstringqrcodeFormatimagebase64时,文件默认保存到当前项目
pagePathpagePath / pp / pstring预览页面路径
searchQuerysearchQuery / sq / qstring预览页面启动参数
sourceMapSavePath当前项目下soucemap.zipsourceMapSavePath / spstring保存 sourcemap 的绝对路径

编译配置

key默认值env类型必填说明
es6es6boolean启用 es6
es7es7boolean启用 es7
minifyminifyboolean启用压缩代码
codeProtectcodeProtectboolean启用代码混淆
minifyJSminifyJSboolean启用压缩 JS
minifyWXMLminifyWXMLboolean启用压缩 XWML
minifyWXSSminifyWXSSboolean启用压缩 WXSS
autoPrefixWXSSautoPrefixWXSSboolean启用自动补全 WXSS

示例

// project
"type":"miniProgram",
"appid":"93457450667",
"privateKeyPath":"dist/weapp",
"privateKeyPath":"private.key",
// settings
"setting":{
    "es6":true,
    "es7":true,
    "minify":true,
    "codeProtect":true,
    "minifyJS":true,
    "minifyWXML":true,
    "minifyWXSS":true,
    "autoPrefixWXSS":true,
}
// others
"robot":10,
"qrcodeFormat":"image",
"qrcodeOutputDest":"preview.jpg",
"pagePath":"pages/users/index",
"searchQuery":"user_id=87504653",
"sourceMapSavePath":"sourcemap.zip"

使用

上传

mini-ci upload -h
mini-ci upload --ver "1.0.0"

预览

mini-ci preview -h
mini-ci preview

构建 npm

mini-ci build -h
mini-ci build

获取 sourcemap

mini-ci sourcemap -h
mini-ci sourcemap

全局配置

# 查看config帮助信息
mini-ci config -h

设置项目配置

# 设置项目配置
mini-ci config set --name test_set_project --path /Users/vyron/mini/mini-ci.json --default

获取项目配置列表

mini-ci config ls

获取项目配置详情

mini-ci config get --name test_set_project

删除项目配置

mini-ci config delete --name test_set_project

获取或设置默认配置

# 获取默认配置
mini-ci config default

# 设置为默认配置  项目名(test_set_project)必须已存在
mini-ci config default --name test_set_project

导出项目配置

# 如果不指定导出项目名,导出默认项目配置,默认导出路径为当前项目 export-mini-ci.json
mini-ci config export --name test

清空项目配置

# 清空所有配置
mini-ci config clear

# 展示当前配置列表
mini-ci config ls

参考文档

小程序开发者文档
miniprogram-ci(npm)

维护者

Vyron

如何贡献

非常欢迎你的加入!提一个 Issue 或者提交一个 Pull Request。

使用许可

MIT © VFiee

FAQs

Package last updated on 23 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts