Giter Site home page Giter Site logo

mini-ci's Introduction

wx-mini-ci

微信小程序CI工具

安装

npm install wx-mini-ci --save-dev

yarn add wx-mini-ci --save-dev

github下载了仓库代码的话,创建全局软连接

yarn link 或 npm link

开发完成关闭软连接

yarn unlink mini 或 npm unlink mini

项目配置

在项目根目录添加ci.config.js配置文件

module.exports = {
    appid: 'wxe848c704ff29506e',
    projectPath: './', // uni-app编译后路径
    keyPath: './private.upload.key', // 上传授权KEY
    qrcodeOutput: './dist/qrcode.jpg',
    maxVersionNum: 5, // test|demo|prod每个环境至多留存10个版本
    build: false, // 是否需要编译 原生小程序不需要编译,需要编译的话写上编译的话,设置为true(目前默认为uni-app编译命令)
};

进入微信公众平台 - 开发 - 开发管理

生成upload.key

生成private.upload.key文件保存到根目录

设置上传IP白名单或者直接关掉IP白名单验证

开发调试

开发者工具调试

修改_config.js文件SEVER_ENV变量为test

打开微信开发者工具预览和调试

真机预览

mini preview [env]

生成二维码qrcode.jpg文件到根目录下的/dist文件夹

发布

1、提交MR到develop或master

2、执行mini tag [env]命令,完成选择发布环境、发布分支、更新类型、更新描述命令行交互

3、执行mini upload [env]上传

4、小程序公众平台设置为体验版本或提审

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.