From 688f3f594bb3d9a718efbe54f97c23f9fc2050b7 Mon Sep 17 00:00:00 2001 From: Ahmed Charles Date: Fri, 13 Apr 2018 11:20:46 +0000 Subject: [PATCH] Update some dependencies. Rollup warns about unknown arguments now, so use --environment instead. --- package.json | 26 +++++++++++++------------- rollup.config.js | 6 +++--- tsconfig.json | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index d3b8965..ec3c096 100644 --- a/package.json +++ b/package.json @@ -6,13 +6,13 @@ "//": "If you add or change the names of destinations in screeps.json, make sure you update these scripts to reflect the changes", "scripts": { "lint": "tslint \"src/**/*.ts\"", - "push-main": "rollup -c --dest main", - "push-pserver": "rollup -c --dest pserver", - "push-sim": "rollup -c --dest sim", + "push-main": "rollup -c --environment DEST:main", + "push-pserver": "rollup -c --environment DEST:pserver", + "push-sim": "rollup -c --environment DEST:sim", "test": "echo \"Error: no test specified\" && exit 1", - "watch-main": "rollup -cw --dest main", - "watch-pserver": "rollup -cw --dest pserver", - "watch-sim": "rollup -cw --dest sim" + "watch-main": "rollup -cw --environment DEST:main", + "watch-pserver": "rollup -cw --environment DEST:pserver", + "watch-sim": "rollup -cw --environment DEST:sim" }, "repository": { "type": "git", @@ -26,15 +26,15 @@ "homepage": "https://github.com/screepers/screeps-typescript-starter#readme", "devDependencies": { "@types/lodash": "^3.10.1", - "@types/screeps": "^2.1.0", - "rollup": "^0.55.3", + "@types/screeps": "^2.2.1", + "rollup": "^0.57.1", "rollup-plugin-clean": "^1.0.0", - "rollup-plugin-commonjs": "^8.2.6", - "rollup-plugin-node-resolve": "^3.0.0", + "rollup-plugin-commonjs": "^9.1.0", + "rollup-plugin-node-resolve": "^3.3.0", "rollup-plugin-screeps": "^0.1.2", - "rollup-plugin-typescript2": "^0.11.0", - "tslint": "^5.8.0", - "typescript": "^2.7.1" + "rollup-plugin-typescript2": "^0.12.0", + "tslint": "^5.9.1", + "typescript": "^2.8.1" }, "dependencies": { "source-map": "~0.6.1" diff --git a/rollup.config.js b/rollup.config.js index cce5d50..0c8ce50 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -7,10 +7,10 @@ import typescript from "rollup-plugin-typescript2"; import screeps from "rollup-plugin-screeps"; let cfg; -const i = process.argv.indexOf("--dest") + 1; -if (i == 0) { +const dest = process.env.DEST; +if (!dest) { console.log("No destination specified - code will be compiled but not uploaded"); -} else if (i >= process.argv.length || (cfg = require("./screeps")[process.argv[i]]) == null) { +} else if ((cfg = require("./screeps")[dest]) == null) { throw new Error("Invalid upload destination"); } diff --git a/tsconfig.json b/tsconfig.json index 23e9345..0047b14 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "module": "commonjs", + "module": "es2015", "target": "es5", "outDir": "dist", "baseUrl": "src/",