watchful-cli 1.7.45 → 1.7.47

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/bin/main.js CHANGED
@@ -1,9 +1,63 @@
1
1
  "use strict";
2
2
 
3
- const actions = require("./actions");
3
+ const helpAction = require("./action/help"),
4
+ batchAction = require("./action/batch"),
5
+ versionAction = require("./action/version"),
6
+ incrementalAction = require("./action/incremental");
7
+
8
+ const { HELP_COMMAND, BATCH_COMMAND, VERSION_COMMAND, INCREMENTAL_COMMAND } = require("./commands"),
9
+ { DEFAULT_HELP,
10
+ DEFAULT_WAIT,
11
+ DEFAULT_NODE,
12
+ DEFAULT_DEBUG,
13
+ DEFAULT_RELEASE,
14
+ DEFAULT_BUNDLER,
15
+ DEFAULT_VERSION,
16
+ DEFAULT_QUIETLY,
17
+ DEFAULT_METRICS,
18
+ DEFAULT_ENTRY_FILE,
19
+ DEFAULT_PROCESSES,
20
+ DEFAULT_TRANSPILER,
21
+ DEFAULT_BUNDLE_FILE,
22
+ DEFAULT_LIB_DIRECTORY,
23
+ DEFAULT_TEMP_DIRECTORY,
24
+ DEFAULT_SOURCE_DIRECTORY } = require("./defaults");
4
25
 
5
26
  function main(command, argument, options) {
6
- actions(command, argument, options);
27
+ const commandMissing = (command === null),
28
+ { help = DEFAULT_HELP,
29
+ wait = DEFAULT_WAIT,
30
+ node = DEFAULT_NODE,
31
+ debug = DEFAULT_DEBUG,
32
+ release = DEFAULT_RELEASE,
33
+ bundler = DEFAULT_BUNDLER,
34
+ version = DEFAULT_VERSION,
35
+ quietly = DEFAULT_QUIETLY,
36
+ metrics = DEFAULT_METRICS,
37
+ entryFile = DEFAULT_ENTRY_FILE,
38
+ processes = DEFAULT_PROCESSES,
39
+ transpiler = DEFAULT_TRANSPILER,
40
+ bundleFile = DEFAULT_BUNDLE_FILE,
41
+ libDirectory = DEFAULT_LIB_DIRECTORY,
42
+ tempDirectory = DEFAULT_TEMP_DIRECTORY,
43
+ sourceDirectory = DEFAULT_SOURCE_DIRECTORY } = options;
44
+
45
+ if (false) {
46
+ ///
47
+ } else if (help) {
48
+ command = HELP_COMMAND;
49
+ } else if (version) {
50
+ command = VERSION_COMMAND;
51
+ } else if (commandMissing) {
52
+ command = INCREMENTAL_COMMAND;
53
+ }
54
+
55
+ switch (command) {
56
+ case HELP_COMMAND: helpAction(); break;
57
+ case BATCH_COMMAND: batchAction(wait, node, debug, release, bundler, quietly, metrics, entryFile, processes, transpiler, bundleFile, libDirectory, tempDirectory, sourceDirectory); break;
58
+ case VERSION_COMMAND: versionAction(); break;
59
+ case INCREMENTAL_COMMAND: incrementalAction(wait, node, debug, release, bundler, quietly, metrics, entryFile, processes, transpiler, bundleFile, libDirectory, tempDirectory, sourceDirectory); break;
60
+ }
7
61
  }
8
62
 
9
63
  module.exports = main;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "watchful-cli",
3
3
  "author": "James Smith",
4
- "version": "1.7.45",
4
+ "version": "1.7.47",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/watchful-cli",
7
7
  "description": "Incremental transpilation with bundling.",
package/bin/actions.js DELETED
@@ -1,63 +0,0 @@
1
- "use strict";
2
-
3
- const helpAction = require("./action/help"),
4
- batchAction = require("./action/batch"),
5
- versionAction = require("./action/version"),
6
- incrementalAction = require("./action/incremental");
7
-
8
- const { HELP_COMMAND, BATCH_COMMAND, VERSION_COMMAND, INCREMENTAL_COMMAND } = require("./commands"),
9
- { DEFAULT_HELP,
10
- DEFAULT_WAIT,
11
- DEFAULT_NODE,
12
- DEFAULT_DEBUG,
13
- DEFAULT_RELEASE,
14
- DEFAULT_BUNDLER,
15
- DEFAULT_VERSION,
16
- DEFAULT_QUIETLY,
17
- DEFAULT_METRICS,
18
- DEFAULT_ENTRY_FILE,
19
- DEFAULT_PROCESSES,
20
- DEFAULT_TRANSPILER,
21
- DEFAULT_BUNDLE_FILE,
22
- DEFAULT_LIB_DIRECTORY,
23
- DEFAULT_TEMP_DIRECTORY,
24
- DEFAULT_SOURCE_DIRECTORY } = require("./defaults");
25
-
26
- function actions(command, argument, options) {
27
- const commandMissing = (command === null),
28
- { help = DEFAULT_HELP,
29
- wait = DEFAULT_WAIT,
30
- node = DEFAULT_NODE,
31
- debug = DEFAULT_DEBUG,
32
- release = DEFAULT_RELEASE,
33
- bundler = DEFAULT_BUNDLER,
34
- version = DEFAULT_VERSION,
35
- quietly = DEFAULT_QUIETLY,
36
- metrics = DEFAULT_METRICS,
37
- entryFile = DEFAULT_ENTRY_FILE,
38
- processes = DEFAULT_PROCESSES,
39
- transpiler = DEFAULT_TRANSPILER,
40
- bundleFile = DEFAULT_BUNDLE_FILE,
41
- libDirectory = DEFAULT_LIB_DIRECTORY,
42
- tempDirectory = DEFAULT_TEMP_DIRECTORY,
43
- sourceDirectory = DEFAULT_SOURCE_DIRECTORY } = options;
44
-
45
- if (false) {
46
- ///
47
- } else if (help) {
48
- command = HELP_COMMAND;
49
- } else if (version) {
50
- command = VERSION_COMMAND;
51
- } else if (commandMissing) {
52
- command = INCREMENTAL_COMMAND;
53
- }
54
-
55
- switch (command) {
56
- case HELP_COMMAND: helpAction(); break;
57
- case BATCH_COMMAND: batchAction(wait, node, debug, release, bundler, quietly, metrics, entryFile, processes, transpiler, bundleFile, libDirectory, tempDirectory, sourceDirectory); break;
58
- case VERSION_COMMAND: versionAction(); break;
59
- case INCREMENTAL_COMMAND: incrementalAction(wait, node, debug, release, bundler, quietly, metrics, entryFile, processes, transpiler, bundleFile, libDirectory, tempDirectory, sourceDirectory); break;
60
- }
61
- }
62
-
63
- module.exports = actions;