newcandies 0.1.2 → 0.1.3

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/dist/index.js CHANGED
@@ -128,6 +128,34 @@ function TEMPLATESafe(type) {
128
128
  return [{ value: "default", label: "Default (Expo Router + Uniwind)" }];
129
129
  }
130
130
  async function writeBaseline({ dest, name, withQuery }) {
131
+ const baseDeps = {
132
+ // Expo core + platform libs
133
+ expo: "latest",
134
+ "expo-constants": "~18.0.10",
135
+ "expo-font": "~14.0.9",
136
+ "expo-linking": "~8.0.8",
137
+ "expo-router": "~6.0.14",
138
+ "expo-splash-screen": "~31.0.10",
139
+ "expo-status-bar": "~3.0.8",
140
+ "expo-web-browser": "~15.0.9",
141
+ // React ecosystem
142
+ react: "19.1.0",
143
+ "react-dom": "19.1.0",
144
+ "react-native": "0.81.5",
145
+ "react-native-web": "~0.21.0",
146
+ // RN libs
147
+ "react-native-reanimated": "~4.1.1",
148
+ "react-native-gesture-handler": "latest",
149
+ "react-native-safe-area-context": "~5.6.0",
150
+ "react-native-screens": "~4.16.0",
151
+ "react-native-worklets": "0.5.1",
152
+ // Styling
153
+ tailwindcss: "^4.1.16",
154
+ uniwind: "^1.0.0"
155
+ };
156
+ if (withQuery) {
157
+ baseDeps["@tanstack/react-query"] = "latest";
158
+ }
131
159
  const pkg = {
132
160
  name,
133
161
  version: "0.0.0",
@@ -137,16 +165,54 @@ async function writeBaseline({ dest, name, withQuery }) {
137
165
  start: "expo start",
138
166
  android: "expo run:android",
139
167
  ios: "expo run:ios"
168
+ },
169
+ dependencies: baseDeps,
170
+ devDependencies: {
171
+ "@types/react": "~19.1.0",
172
+ typescript: "~5.9.2"
140
173
  }
141
174
  };
142
175
  await fs.writeJSON(path.join(dest, "package.json"), pkg, { spaces: 2 });
176
+ const slug = String(name).toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
177
+ const pkgNameSegment = slug.replace(/-/g, "") || "app";
178
+ const bundleId = `com.example.${pkgNameSegment}`;
143
179
  const appJson = {
144
180
  expo: {
145
181
  name,
146
- slug: name,
147
- scheme: "newcandies",
182
+ slug,
183
+ version: "1.0.0",
184
+ orientation: "portrait",
185
+ icon: "./assets/images/icon.png",
186
+ scheme: slug,
187
+ userInterfaceStyle: "automatic",
188
+ newArchEnabled: true,
189
+ splash: {
190
+ image: "./assets/images/splash-icon.png",
191
+ resizeMode: "contain",
192
+ backgroundColor: "#ffffff"
193
+ },
194
+ ios: {
195
+ supportsTablet: true,
196
+ bundleIdentifier: bundleId
197
+ },
198
+ android: {
199
+ adaptiveIcon: {
200
+ foregroundImage: "./assets/images/adaptive-icon.png",
201
+ backgroundColor: "#ffffff"
202
+ },
203
+ edgeToEdgeEnabled: true,
204
+ predictiveBackGestureEnabled: false,
205
+ package: bundleId
206
+ },
207
+ web: {
208
+ bundler: "metro",
209
+ output: "static",
210
+ favicon: "./assets/images/favicon.png"
211
+ },
148
212
  plugins: ["expo-router"],
149
- experiments: { typedRoutes: true }
213
+ experiments: {
214
+ typedRoutes: true
215
+ }
150
216
  }
151
217
  };
152
218
  await fs.writeJSON(path.join(dest, "app.json"), appJson, { spaces: 2 });
@@ -186,6 +252,16 @@ module.exports = withUniwindConfig(config, {
186
252
  await fs.writeJSON(path.join(dest, "tsconfig.json"), tsconfig, { spaces: 2 });
187
253
  const appDir = path.join(dest, "app");
188
254
  await fs.ensureDir(appDir);
255
+ const easJson = {
256
+ cli: { version: ">= 7.0.0" },
257
+ build: {
258
+ development: { developmentClient: true, distribution: "internal" },
259
+ preview: { distribution: "internal" },
260
+ production: {}
261
+ },
262
+ submit: { production: {} }
263
+ };
264
+ await fs.writeJSON(path.join(dest, "eas.json"), easJson, { spaces: 2 });
189
265
  const globalCss = `@import 'tailwindcss';
190
266
  @import 'uniwind';
191
267
 
@@ -284,6 +360,10 @@ export default Settings;
284
360
  }
285
361
  async function applyTemplateOverlay({ dest, type, template, category, variant }) {
286
362
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
363
+ const defaultSrc = path.join(__dirname, "..", "templates", "default");
364
+ if (await fs.pathExists(defaultSrc)) {
365
+ await fs.copy(defaultSrc, dest, { overwrite: false, errorOnExist: false });
366
+ }
287
367
  let src = null;
288
368
  if (type === "app-brief" || type === "mini-app-brief") {
289
369
  if (category && variant) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newcandies",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Scaffold Expo Router + Uniwind React Native apps with layered templates.",
5
5
  "type": "module",
6
6
  "bin": {