ttm-build

1.0.2 • Public • Published

开发测试:

git clone http://git.superboss.cc/base/tatami-build.git
cd ttm-build && npm i --registry=https://registry.npm.taobao.org
npm link

这样就安装完成了

进入工作目录

本地开发

ttm b

分包压缩

ttm b -prod

启动server

// step1. 需要在项目.modelT/team.json 中配置
{
    "server": {
        "proxyPass": {
            "online": "http://121.43.69.90", // 线上ip地址
            "test": "http://121.199.170.10"  // 测试机ip地址
        },
        "replaceMap": {
            "forward\\.jsp$": "/dist/index.html",   // 静态文件替换规则
            "\\.(js|css|png|jpg)$": "/dist"
        }
    }
}

// step2. 在host中把域名地址指向本机, 如: 127.0.0.1 wdst2.tao21.org

// step4. 执行其中一个指令
ttm s               使用mock数据
ttm s --mode online 代理请求到线上
ttm s --mode test   代理请求到测试服务器

// step3. 在千牛或者浏览器中打开项目地址

Dependencies (43)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i ttm-build

    Weekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • luckyx