create-apexjs 0.6.10 → 0.6.12

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.
Files changed (2) hide show
  1. package/dist/index.js +18 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11,7 +11,8 @@ var TEMPLATE_DIR = fileURLToPath(new URL("../templates/default", import.meta.url
11
11
  var FEATURES = [
12
12
  { key: "data", title: "Data & models" },
13
13
  { key: "auth", title: "Auth" },
14
- { key: "i18n", title: "i18n" }
14
+ { key: "i18n", title: "i18n" },
15
+ { key: "pwa", title: "PWA (installable + offline)" }
15
16
  ];
16
17
  function substituteName(dir, name) {
17
18
  for (const entry of readdirSync(dir, { withFileTypes: true })) {
@@ -88,6 +89,10 @@ var main = defineCommand({
88
89
  i18n: {
89
90
  type: "boolean",
90
91
  description: "Include the i18n feature (skips the prompt)"
92
+ },
93
+ pwa: {
94
+ type: "boolean",
95
+ description: "Include the PWA feature (skips the prompt)"
91
96
  }
92
97
  },
93
98
  async run({ args }) {
@@ -157,6 +162,18 @@ var main = defineCommand({
157
162
  `
158
163
  );
159
164
  }
165
+ if (applied.length) {
166
+ console.log(` Installing feature dependencies with ${c.cyan(pm)}\u2026
167
+ `);
168
+ const installArgs = pm === "npm" ? ["install", "--no-audit", "--no-fund"] : ["install"];
169
+ if (!run(pm, installArgs, target)) {
170
+ console.log(
171
+ `
172
+ ${c.yellow("\u26A0")} Feature dependency install failed \u2014 run ${c.cyan(`${pm} install`)} in the app.
173
+ `
174
+ );
175
+ }
176
+ }
160
177
  } else {
161
178
  console.log(
162
179
  `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-apexjs",
3
- "version": "0.6.10",
3
+ "version": "0.6.12",
4
4
  "description": "Scaffold a new Apex JS app",
5
5
  "type": "module",
6
6
  "license": "MIT",