lwr 0.9.0-alpha.21 → 0.9.0-alpha.22

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.
@@ -61,12 +61,13 @@ cli.command("build", "Builds a static LWR site").alias("static-build").option("-
61
61
  process.exit(1);
62
62
  }
63
63
  });
64
- cli.command("experimental-build-server", "Builds a LWR server").option("--outputDir <directory>", `[string] output directory`).option("--rootDir <directory>", "[string] root directory override").option("--minify <minify>", "[boolean] minifies build ouput (default: true)").action(async (options) => {
64
+ cli.command("experimental-build-server", "Builds a LWR server").option("--outputDir <directory>", `[string] output directory`).option("--rootDir <directory>", "[string] root directory override").option("--minify <minify>", "[boolean] minifies build output (default: false)").action(async (options) => {
65
65
  try {
66
66
  import_shared_utils.logger.warn("[Server Build] This command is experimental and will change in future releases!");
67
- const {outputDir = "./build", rootDir, minify = true} = options;
67
+ const {outputDir = "./build", rootDir, minify = false} = options;
68
68
  const {buildServer} = await Promise.resolve().then(() => __toModule(require("@lwrjs/tools")));
69
- await buildServer({rootDir}, {outputDir, minify});
69
+ const castMinify = minify == "false" ? false : !!minify;
70
+ await buildServer({rootDir}, {outputDir, minify: castMinify});
70
71
  } catch (error) {
71
72
  import_shared_utils.logger.error(error);
72
73
  process.exit(1);
@@ -65,13 +65,15 @@ cli.command('build', 'Builds a static LWR site') // default command
65
65
  cli.command('experimental-build-server', 'Builds a LWR server')
66
66
  .option('--outputDir <directory>', `[string] output directory`)
67
67
  .option('--rootDir <directory>', '[string] root directory override')
68
- .option('--minify <minify>', '[boolean] minifies build ouput (default: true)')
68
+ .option('--minify <minify>', '[boolean] minifies build output (default: false)')
69
69
  .action(async (options) => {
70
70
  try {
71
71
  logger.warn('[Server Build] This command is experimental and will change in future releases!');
72
- const { outputDir = './build', rootDir, minify = true } = options;
72
+ const { outputDir = './build', rootDir, minify = false } = options;
73
73
  const { buildServer } = await import('@lwrjs/tools');
74
- await buildServer({ rootDir }, { outputDir, minify });
74
+ // Catch minify flag is the literal 'false'
75
+ const castMinify = minify == 'false' ? false : !!minify;
76
+ await buildServer({ rootDir }, { outputDir, minify: castMinify });
75
77
  }
76
78
  catch (error) {
77
79
  logger.error(error);
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "type": "module",
20
20
  "types": "build/es/index.d.ts",
21
- "version": "0.9.0-alpha.21",
21
+ "version": "0.9.0-alpha.22",
22
22
  "module": "build/es/index.js",
23
23
  "main": "build/cjs/index.cjs",
24
24
  "files": [
@@ -41,14 +41,14 @@
41
41
  }
42
42
  },
43
43
  "dependencies": {
44
- "@lwrjs/core": "0.9.0-alpha.21",
45
- "@lwrjs/diagnostics": "0.9.0-alpha.21"
44
+ "@lwrjs/core": "0.9.0-alpha.22",
45
+ "@lwrjs/diagnostics": "0.9.0-alpha.22"
46
46
  },
47
47
  "devDependencies": {
48
- "@lwrjs/tools": "0.9.0-alpha.21",
49
- "@lwrjs/types": "0.9.0-alpha.21",
48
+ "@lwrjs/tools": "0.9.0-alpha.22",
49
+ "@lwrjs/types": "0.9.0-alpha.22",
50
50
  "cac": "^6.7.8",
51
51
  "chalk": "^4.1.0"
52
52
  },
53
- "gitHead": "a89adcac80601f657becd6fd734c765e6b2a2745"
53
+ "gitHead": "d7e7a6e84df652a09d78b9b0fadca271a438a01c"
54
54
  }