Implement #75
This commit is contained in:
@@ -6,6 +6,16 @@ import commonjs from "rollup-plugin-commonjs";
|
||||
import screeps from "rollup-plugin-screeps";
|
||||
import typescript from "rollup-plugin-typescript2";
|
||||
|
||||
const config = require("./screeps");
|
||||
|
||||
let cfg;
|
||||
const i = process.argv.indexOf("--dest") + 1;
|
||||
if (i == 0) {
|
||||
console.log("No destination specified - code will be compiled but not uploaded");
|
||||
} else if (i >= process.argv.length || (cfg = config[process.argv[i]]) == null) {
|
||||
throw new Error("Invalid upload destination");
|
||||
}
|
||||
|
||||
export default {
|
||||
input: "src/main.ts",
|
||||
output: {
|
||||
@@ -20,6 +30,6 @@ export default {
|
||||
resolve(),
|
||||
commonjs(),
|
||||
typescript({tsconfig: "./tsconfig.json"}),
|
||||
screeps({configFile: "./screeps.json"})
|
||||
screeps({config: cfg, dryRun: cfg == null})
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user