Giter VIP home page Giter VIP logo

mpx-workflow's Introduction

使用教程

# 创建一个新的项目
git init
git remote add workflow https://github.com/guless/mpx-workflow.git
git fetch workflow
git merge workflow/master

git remote add origin https://github.com/{你的仓库的地址}.git
git push -u origin master

# 如果后续更新工作流可以直接将 workflow/master 合并至你的分支中!
# git merge workflow/master

# 安装 npm 依赖项
npm i

命令行

任务 说明
dev watch 任务。
start watch 任务。
watch 启动开发模式。在开发模式下会自动监听文件改动触发重新编译。
build 编译生产模式。生产模式不会监听文件改动,仅执行一次编译。在生产模式下,dist 目录中的文件会被清空,然后重新输出一份。使用生产模式会对所有的区块(chunk)、模块(module)、资源(resource)进行压缩和优化。
watch:test 启动开发模式,使用【测试环境】的接口。等同于:npm run watch -- --env.target=test
watch:beta 启动开发模式,使用【预览环境】的接口。等同于:npm run watch -- --env.target=beta
watch:prod 启动开发模式,使用【生产环境】的接口。等同于:npm run watch -- --env.target=prod
build:test 编译生产模式,使用【测试环境】的接口。等同于:npm run build -- --env.target=test
build:beta 编译生产模式,使用【预览环境】的接口。等同于:npm run build -- --env.target=beta
build:prod 编译生产模式,使用【生产环境】的接口。等同于:npm run build -- --env.target=prod

注:通过在命令行输入 npm run {任务} 来运行对应的任务。

命令行参数

名称 示例 说明
--env.mode npm run build -- --env.mode=development 指定编译模式。
  • "development":开发模式
  • "production":生产模式
--env.target npm run build -- --env.target=test 指定开发环境。
  • "test":测试环境
  • "beta":预览环境
  • "prod":生产环境

mpx-workflow's People

Contributors

samlv9 avatar

Stargazers

ludis avatar  avatar  avatar Ling.Q avatar  avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

yinran100

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.