watchful-cli 1.7.35 → 1.7.36

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.
@@ -4,6 +4,7 @@ const { HELP_OPTION,
4
4
  NODE_OPTION,
5
5
  WAIT_OPTION,
6
6
  DEBUG_OPTION,
7
+ MINIFY_OPTION,
7
8
  BUNDLER_OPTION,
8
9
  QUIETLY_OPTION,
9
10
  VERSION_OPTION,
@@ -20,6 +21,7 @@ const h = HELP_OPTION,
20
21
  n = NODE_OPTION,
21
22
  w = WAIT_OPTION,
22
23
  d = DEBUG_OPTION,
24
+ i = MINIFY_OPTION,
23
25
  u = BUNDLER_OPTION,
24
26
  q = QUIETLY_OPTION,
25
27
  v = VERSION_OPTION,
@@ -37,6 +39,7 @@ module.exports = {
37
39
  n,
38
40
  w,
39
41
  d,
42
+ i,
40
43
  u,
41
44
  q,
42
45
  v,
@@ -10,7 +10,7 @@ const action = require("../action"),
10
10
 
11
11
  const { BATCH_BUILD_FAILED_MESSAGE } = require("../messages");
12
12
 
13
- function batchAction(wait, node, debug, bundler, quietly, metrics, entryFile, processes, transpiler, bundleFile, libDirectory, tempDirectory, sourceDirectory) {
13
+ function batchAction(wait, node, debug, minify, bundler, quietly, metrics, entryFile, processes, transpiler, bundleFile, libDirectory, tempDirectory, sourceDirectory) {
14
14
  const operations = [
15
15
  initialiseOperation,
16
16
  createTranspileFileFunctionOperation,
@@ -23,6 +23,7 @@ function batchAction(wait, node, debug, bundler, quietly, metrics, entryFile, pr
23
23
  wait,
24
24
  node,
25
25
  debug,
26
+ minify,
26
27
  bundler,
27
28
  quietly,
28
29
  metrics,
@@ -9,7 +9,7 @@ const watch = require("../watch"),
9
9
 
10
10
  const { INCREMENTAL_BUILD_FAILED_MESSAGE } = require("../messages");
11
11
 
12
- function incrementalAction(wait, node, debug, bundler, quietly, metrics, entryFile, processes, transpiler, bundleFile, libDirectory, tempDirectory, sourceDirectory) {
12
+ function incrementalAction(wait, node, debug, minify, bundler, quietly, metrics, entryFile, processes, transpiler, bundleFile, libDirectory, tempDirectory, sourceDirectory) {
13
13
  const operations = [
14
14
  initialiseOperation,
15
15
  createTranspileFileFunctionOperation,
@@ -20,6 +20,7 @@ function incrementalAction(wait, node, debug, bundler, quietly, metrics, entryFi
20
20
  wait,
21
21
  node,
22
22
  debug,
23
+ minify,
23
24
  bundler,
24
25
  quietly,
25
26
  metrics,
package/bin/actions.js CHANGED
@@ -10,8 +10,9 @@ const { HELP_COMMAND, BATCH_COMMAND, VERSION_COMMAND, INCREMENTAL_COMMAND } = re
10
10
  DEFAULT_WAIT,
11
11
  DEFAULT_NODE,
12
12
  DEFAULT_DEBUG,
13
- DEFAULT_VERSION,
13
+ DEFAULT_MINIFY,
14
14
  DEFAULT_BUNDLER,
15
+ DEFAULT_VERSION,
15
16
  DEFAULT_QUIETLY,
16
17
  DEFAULT_METRICS,
17
18
  DEFAULT_ENTRY_FILE,
@@ -28,8 +29,9 @@ function actions(command, argument, options) {
28
29
  wait = DEFAULT_WAIT,
29
30
  node = DEFAULT_NODE,
30
31
  debug = DEFAULT_DEBUG,
31
- version = DEFAULT_VERSION,
32
+ minify = DEFAULT_MINIFY,
32
33
  bundler = DEFAULT_BUNDLER,
34
+ version = DEFAULT_VERSION,
33
35
  quietly = DEFAULT_QUIETLY,
34
36
  metrics = DEFAULT_METRICS,
35
37
  entryFile = DEFAULT_ENTRY_FILE,
@@ -52,9 +54,9 @@ function actions(command, argument, options) {
52
54
 
53
55
  switch (command) {
54
56
  case HELP_COMMAND: helpAction(); break;
55
- case BATCH_COMMAND: batchAction(wait, node, debug, bundler, quietly, metrics, entryFile, processes, transpiler, bundleFile, libDirectory, tempDirectory, sourceDirectory); break;
57
+ case BATCH_COMMAND: batchAction(wait, node, debug, minify, bundler, quietly, metrics, entryFile, processes, transpiler, bundleFile, libDirectory, tempDirectory, sourceDirectory); break;
56
58
  case VERSION_COMMAND: versionAction(); break;
57
- case INCREMENTAL_COMMAND: incrementalAction(wait, node, debug, bundler, quietly, metrics, entryFile, processes, transpiler, bundleFile, libDirectory, tempDirectory, sourceDirectory); break;
59
+ case INCREMENTAL_COMMAND: incrementalAction(wait, node, debug, minify, bundler, quietly, metrics, entryFile, processes, transpiler, bundleFile, libDirectory, tempDirectory, sourceDirectory); break;
58
60
  }
59
61
  }
60
62
 
package/bin/defaults.js CHANGED
@@ -6,8 +6,9 @@ const DEFAULT_HELP = false,
6
6
  DEFAULT_WAIT = 0,
7
7
  DEFAULT_NODE = false,
8
8
  DEFAULT_DEBUG = false,
9
- DEFAULT_VERSION = false,
9
+ DEFAULT_MINIFY = false,
10
10
  DEFAULT_BUNDLER = BROWSERIFY,
11
+ DEFAULT_VERSION = false,
11
12
  DEFAULT_QUIETLY = false,
12
13
  DEFAULT_METRICS = false,
13
14
  DEFAULT_PROCESSES = 1,
@@ -23,8 +24,9 @@ module.exports = {
23
24
  DEFAULT_WAIT,
24
25
  DEFAULT_NODE,
25
26
  DEFAULT_DEBUG,
26
- DEFAULT_VERSION,
27
+ DEFAULT_MINIFY,
27
28
  DEFAULT_BUNDLER,
29
+ DEFAULT_VERSION,
28
30
  DEFAULT_QUIETLY,
29
31
  DEFAULT_METRICS,
30
32
  DEFAULT_PROCESSES,
@@ -32,7 +32,7 @@ function createEsbuildBundleFilesFunction(context) {
32
32
  esbuild = require(esbuildPath);
33
33
 
34
34
  esBuildBundleFilesFunction = (entryFilePath, bundleFilePath, targetDirectoryPath, callback) => {
35
- const { node, debug } = context,
35
+ const { node, debug, minify } = context,
36
36
  bundler = esbuild, ///
37
37
  targetEntryFilePath = combinePaths(targetDirectoryPath, entryFilePath),
38
38
  entryPoint = targetEntryFilePath, ///
@@ -44,7 +44,8 @@ function createEsbuildBundleFilesFunction(context) {
44
44
  options = {
45
45
  entryPoints,
46
46
  outfile,
47
- bundle
47
+ bundle,
48
+ minify
48
49
  };
49
50
 
50
51
  if (debug) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "watchful-cli",
3
3
  "author": "James Smith",
4
- "version": "1.7.35",
4
+ "version": "1.7.36",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/watchful-cli",
7
7
  "description": "Incremental transpilation with bundling.",