UNPKG

437 BJavaScriptView Raw
1#!/usr/bin/env node
2"use strict";
3const res = require("./");
4function getProjectPath(p) {
5 return p ? p : ".";
6}
7var command = process.argv[2];
8switch (command) {
9 case "upgrade":
10 var p = getProjectPath(process.argv[3]);
11 res.upgrade.run(p).catch(e => console.log(e));
12 break;
13 default:
14 var p = getProjectPath(command);
15 res.build.build(p).catch(e => console.log(e.stack));
16 break;
17}