plutarch
Cli tool for serve and build react app, support JSON pattern config.
Last updated 2 days ago by schifred .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install plutarch 
SYNC missed versions from official npm registry.

plutarch

基于 webpack4 实现的前端应用开发工具。

快速上手

## 全局或本地安装
$ npm i plutarch -g

## 获取版本
$ plutarch -v
3.0.18

## 创建项目
$ plutarch init # 创建 dva 项目
$ plutarch init -t redux # 创建 redux 项目
$ plutarch init -t mobx # 创建 mobx 项目

## 本地开发
$ plutarch server

## 打包
$ plutarch build

## storybook
$ plutarch story

配置

webpackrc-cfg

数据模拟

通过 plutarch.mock.js 文件配置模拟数据,在dev server中直接挂载控制器实现。

  1. 函数形式
// plutarch.mock.js
module.exports = function(app){
  app.get("/api/test.json",(req,res)=>{
    res.send("test");
  });
};
  1. 对象形式
// plutarch.mock.js
module.exports = {
  "get /api/test.json": "test"
};
  1. 文件控制器形式
// plutarch.mock.js
module.exports = {
  app.get("/api/test.json","test");
};
// mocks/test.js
module.exports = function(req,res){
  res.send("test");
};

Current Tags

  • 3.0.18                                ...           latest (2 days ago)

28 Versions

  • 3.0.18                                ...           2 days ago
  • 3.0.17                                ...           2 days ago
  • 3.0.16                                ...           5 days ago
  • 3.0.15                                ...           6 days ago
  • 3.0.14                                ...           a month ago
  • 3.0.13                                ...           3 months ago
  • 3.0.12                                ...           6 months ago
  • 3.0.11                                ...           6 months ago
  • 3.0.10                                ...           6 months ago
  • 3.0.9                                ...           6 months ago
  • 3.0.8                                ...           6 months ago
  • 3.0.7                                ...           6 months ago
  • 3.0.6                                ...           6 months ago
  • 3.0.5                                ...           6 months ago
  • 3.0.4                                ...           6 months ago
  • 3.0.3                                ...           6 months ago
  • 3.0.2                                ...           6 months ago
  • 3.0.1                                ...           6 months ago
  • 3.0.0                                ...           6 months ago
  • 2.0.2                                ...           a year ago
  • 2.0.1 [deprecated]           ...           a year ago
  • 1.0.6                                ...           a year ago
  • 1.0.5                                ...           a year ago
  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 4
This Month 103
Last Day 4
Last Week 74
Last Month 26
Dependencies (22)
Dev Dependencies (11)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |