newcandies 0.1.7 → 0.1.8

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 +10 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ var TEMPLATES = {
35
35
  "mini-app-brief": { categories: [{ value: "forms", label: "forms", variants: [{ value: "lite", label: "lite" }] }] },
36
36
  "default": [{ value: "default", label: "Default (Expo Router + Uniwind)" }]
37
37
  };
38
- var program = new Command().name("newcandies").option("-t, --type <type>").option("--template <name>").option("--category <name>").option("--variant <name>").option("-y, --yes").option("--pm <pm>", "npm|pnpm|yarn|bun").option("--no-install").parse(process.argv);
38
+ var program = new Command().name("newcandies").option("-t, --type <type>").option("--template <name>").option("--category <name>").option("--variant <name>").option("-y, --yes").option("--pm <pm>", "npm|pnpm|yarn|bun").option("--no-install").option("--no-prebuild").parse(process.argv);
39
39
  var opts = program.opts();
40
40
  async function main() {
41
41
  console.clear();
@@ -111,9 +111,15 @@ async function main() {
111
111
  const extraDeps = resolveExtraDeps({ type: project.type, template: project.template, category: project.category, variant: project.variant });
112
112
  if (project.install) {
113
113
  const si = p.spinner();
114
- si.start("Installing dependencies (via Expo)");
114
+ si.start("Installing dependencies");
115
115
  await installDeps(project.pm, dest, extraDeps);
116
116
  si.stop("Installed");
117
+ if (opts.prebuild !== false) {
118
+ const sp = p.spinner();
119
+ sp.start("Generating ios/android (expo prebuild)");
120
+ await execa("npx", ["expo", "prebuild", "--non-interactive"], { cwd: dest, stdio: "inherit" });
121
+ sp.stop("Native projects generated");
122
+ }
117
123
  }
118
124
  p.outro([
119
125
  pc.green("Next steps:"),
@@ -166,7 +172,8 @@ async function writeBaseline({ dest, name, withQuery }) {
166
172
  scripts: {
167
173
  start: "expo start",
168
174
  android: "expo run:android",
169
- ios: "expo run:ios"
175
+ ios: "expo run:ios",
176
+ prebuild: "expo prebuild"
170
177
  },
171
178
  dependencies: baseDeps,
172
179
  devDependencies: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newcandies",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Scaffold Expo Router + Uniwind React Native apps with layered templates.",
5
5
  "type": "module",
6
6
  "bin": {