create-windowless-app 9.3.7 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cliParser.js CHANGED
@@ -1,103 +1,103 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.parseCommand = void 0;
16
- const chalk_1 = __importDefault(require("chalk"));
17
- const createWindowlessAppUtils_1 = require("./createWindowlessAppUtils");
18
- const fs_extra_1 = require("fs-extra");
19
- const yargs_1 = __importDefault(require("yargs"));
20
- const helpers_1 = require("yargs/helpers");
21
- const interactive_1 = require("./interactive");
22
- const packageJson = require(`../${createWindowlessAppUtils_1.PACKAGE_JSON_FILENAME}`);
23
- const validateInput = (argv) => {
24
- if (argv.icon && !(0, fs_extra_1.pathExistsSync)(argv.icon)) {
25
- console.log(`Cannot find icon in ${chalk_1.default.red(argv.icon)}. Switching to ${chalk_1.default.green("default")} icon.`);
26
- delete argv.icon;
27
- }
28
- return argv;
29
- };
30
- const parseCommand = (argv) => __awaiter(void 0, void 0, void 0, function* () {
31
- const command = (0, yargs_1.default)((0, helpers_1.hideBin)(argv))
32
- .command("* [projectName]", "project name", (yargs) => {
33
- return yargs.positional("projectName", {
34
- describe: "project name",
35
- type: "string"
36
- });
37
- }, () => { })
38
- .option("verbose", {
39
- alias: "v",
40
- type: "boolean",
41
- description: "print additional logs"
42
- })
43
- .option("interactive", {
44
- type: "boolean",
45
- alias: "i",
46
- description: "interactive mode"
47
- })
48
- .option("typescript", {
49
- alias: "t",
50
- type: "boolean",
51
- description: "use typescript",
52
- default: true
53
- })
54
- .option("husky", {
55
- alias: "h",
56
- type: "boolean",
57
- description: "install husky pre-commit hook for building launcher",
58
- default: true
59
- })
60
- .option("skip-install", {
61
- alias: "s",
62
- type: "boolean",
63
- description: "write dependencies to package.json without installing"
64
- })
65
- .option("icon", {
66
- alias: "c",
67
- type: "string",
68
- description: "override default launcher icon file"
69
- })
70
- .option("node-version", {
71
- alias: "n",
72
- type: "string",
73
- description: "override node version to bundle"
74
- })
75
- .check((argv) => {
76
- if (!argv.projectName && !argv.interactive && !argv.help) {
77
- throw new Error("Missing project name");
78
- }
79
- return true;
80
- })
81
- .version("version", packageJson.version)
82
- .help()
83
- .middleware(validateInput)
84
- .strict()
85
- .argv;
86
- let programConfig;
87
- if (command.interactive) {
88
- programConfig = yield (0, interactive_1.interactiveMode)();
89
- }
90
- else {
91
- programConfig = {
92
- projectName: command.projectName,
93
- verbose: command.verbose,
94
- typescript: command.typescript,
95
- husky: command.husky,
96
- skipInstall: command["skip-install"],
97
- icon: command.icon,
98
- nodeVersion: command["node-version"]
99
- };
100
- }
101
- return programConfig;
102
- });
103
- exports.parseCommand = parseCommand;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.parseCommand = void 0;
16
+ const chalk_1 = __importDefault(require("chalk"));
17
+ const createWindowlessAppUtils_1 = require("./createWindowlessAppUtils");
18
+ const fs_extra_1 = require("fs-extra");
19
+ const yargs_1 = __importDefault(require("yargs"));
20
+ const helpers_1 = require("yargs/helpers");
21
+ const interactive_1 = require("./interactive");
22
+ const packageJson = require(`../${createWindowlessAppUtils_1.PACKAGE_JSON_FILENAME}`);
23
+ const validateInput = (argv) => {
24
+ if (argv.icon && !(0, fs_extra_1.pathExistsSync)(argv.icon)) {
25
+ console.log(`Cannot find icon in ${chalk_1.default.red(argv.icon)}. Switching to ${chalk_1.default.green("default")} icon.`);
26
+ delete argv.icon;
27
+ }
28
+ return argv;
29
+ };
30
+ const parseCommand = (argv) => __awaiter(void 0, void 0, void 0, function* () {
31
+ const command = (0, yargs_1.default)((0, helpers_1.hideBin)(argv))
32
+ .command("* [projectName]", "project name", (yargs) => {
33
+ return yargs.positional("projectName", {
34
+ describe: "project name",
35
+ type: "string"
36
+ });
37
+ }, () => { })
38
+ .option("verbose", {
39
+ alias: "v",
40
+ type: "boolean",
41
+ description: "print additional logs"
42
+ })
43
+ .option("interactive", {
44
+ type: "boolean",
45
+ alias: "i",
46
+ description: "interactive mode"
47
+ })
48
+ .option("typescript", {
49
+ alias: "t",
50
+ type: "boolean",
51
+ description: "use typescript",
52
+ default: true
53
+ })
54
+ .option("husky", {
55
+ alias: "h",
56
+ type: "boolean",
57
+ description: "install husky pre-commit hook for building launcher",
58
+ default: true
59
+ })
60
+ .option("skip-install", {
61
+ alias: "s",
62
+ type: "boolean",
63
+ description: "write dependencies to package.json without installing"
64
+ })
65
+ .option("icon", {
66
+ alias: "c",
67
+ type: "string",
68
+ description: "override default launcher icon file"
69
+ })
70
+ .option("node-version", {
71
+ alias: "n",
72
+ type: "string",
73
+ description: "override node version to bundle"
74
+ })
75
+ .check((argv) => {
76
+ if (!argv.projectName && !argv.interactive && !argv.help) {
77
+ throw new Error("Missing project name");
78
+ }
79
+ return true;
80
+ })
81
+ .version("version", packageJson.version)
82
+ .help()
83
+ .middleware(validateInput)
84
+ .strict()
85
+ .argv;
86
+ let programConfig;
87
+ if (command.interactive) {
88
+ programConfig = yield (0, interactive_1.interactiveMode)();
89
+ }
90
+ else {
91
+ programConfig = {
92
+ projectName: command.projectName,
93
+ verbose: command.verbose,
94
+ typescript: command.typescript,
95
+ husky: command.husky,
96
+ skipInstall: command["skip-install"],
97
+ icon: command.icon,
98
+ nodeVersion: command["node-version"]
99
+ };
100
+ }
101
+ return programConfig;
102
+ });
103
+ exports.parseCommand = parseCommand;
package/dist/consts.js CHANGED
@@ -1,65 +1,65 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.consts = void 0;
4
- exports.consts = {
5
- dependencies: [
6
- "node-notifier",
7
- "winston"
8
- ],
9
- devDependencies: [
10
- "fs-extra",
11
- "jest",
12
- "nexe",
13
- "webpack",
14
- "webpack-cli",
15
- "copy-webpack-plugin",
16
- "rimraf",
17
- "cross-spawn"
18
- ],
19
- huskyDependencies: [
20
- "husky"
21
- ],
22
- tsDevDependencies: [
23
- "@types/jest",
24
- "@types/node",
25
- "@tsconfig/node14",
26
- "@types/node-notifier",
27
- "@types/winston",
28
- "ts-loader",
29
- "ts-node",
30
- "typescript",
31
- "@types/cross-spawn"
32
- ],
33
- errorLogFilePatterns: [
34
- "npm-debug.log"
35
- ],
36
- validFiles: [
37
- ".DS_Store",
38
- "Thumbs.db",
39
- ".git",
40
- ".gitignore",
41
- ".idea",
42
- "README.md",
43
- "LICENSE",
44
- ".hg",
45
- ".hgignore",
46
- ".hgcheck",
47
- ".npmignore",
48
- "mkdocs.yml",
49
- "docs",
50
- ".travis.yml",
51
- ".gitlab-ci.yml",
52
- ".gitattributes"
53
- ],
54
- knownGeneratedFiles: [
55
- "package.json",
56
- "webpack.config.js",
57
- "tsconfig.json",
58
- "tsconfig.build.json",
59
- "src",
60
- "resources",
61
- "launcher",
62
- "node_modules"
63
- ]
64
- };
65
- exports.default = exports.consts;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.consts = void 0;
4
+ exports.consts = {
5
+ dependencies: [
6
+ "node-notifier",
7
+ "winston"
8
+ ],
9
+ devDependencies: [
10
+ "fs-extra",
11
+ "jest",
12
+ "nexe",
13
+ "webpack",
14
+ "webpack-cli",
15
+ "copy-webpack-plugin",
16
+ "rimraf",
17
+ "cross-spawn"
18
+ ],
19
+ huskyDependencies: [
20
+ "husky"
21
+ ],
22
+ tsDevDependencies: [
23
+ "@types/jest",
24
+ "@types/node",
25
+ "@tsconfig/node14",
26
+ "@types/node-notifier",
27
+ "@types/winston",
28
+ "ts-loader",
29
+ "ts-node",
30
+ "typescript",
31
+ "@types/cross-spawn"
32
+ ],
33
+ errorLogFilePatterns: [
34
+ "npm-debug.log"
35
+ ],
36
+ validFiles: [
37
+ ".DS_Store",
38
+ "Thumbs.db",
39
+ ".git",
40
+ ".gitignore",
41
+ ".idea",
42
+ "README.md",
43
+ "LICENSE",
44
+ ".hg",
45
+ ".hgignore",
46
+ ".hgcheck",
47
+ ".npmignore",
48
+ "mkdocs.yml",
49
+ "docs",
50
+ ".travis.yml",
51
+ ".gitlab-ci.yml",
52
+ ".gitattributes"
53
+ ],
54
+ knownGeneratedFiles: [
55
+ "package.json",
56
+ "webpack.config.js",
57
+ "tsconfig.json",
58
+ "tsconfig.build.json",
59
+ "src",
60
+ "resources",
61
+ "launcher",
62
+ "node_modules"
63
+ ]
64
+ };
65
+ exports.default = exports.consts;