1 | #! /usr/bin/env node
|
2 | "use strict";
|
3 | const util_1 = require("./util");
|
4 | const promisifed_fs_1 = require("./promisifed-fs");
|
5 | const promise_1 = require("./promise");
|
6 | const fs_1 = require("fs");
|
7 | const path = require("path");
|
8 | const cla = require("command-line-args");
|
9 | const args = cla(util_1.commonArgs.concat({
|
10 | name: "arch",
|
11 | type: String,
|
12 | })).parse();
|
13 | const devPackageFile = path.join(process.cwd(), "package.json");
|
14 | const appDir = args.appDir || util_1.DEFAULT_APP_DIR_NAME;
|
15 | util_1.installDependencies(path.join(process.cwd(), appDir), args.arch, util_1.getElectronVersion(promisifed_fs_1.parseJson(fs_1.readFileSync(devPackageFile, "utf8"), devPackageFile), devPackageFile))
|
16 | .catch(promise_1.printErrorAndExit);
|
17 |
|
\ | No newline at end of file |