create-croissant 0.1.47 → 0.1.48

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 (47) hide show
  1. package/package.json +1 -1
  2. package/template/apps/platform/src/routes/api/auth/$.ts +1 -1
  3. package/template/apps/platform/src/routes/api/rpc.$.ts +2 -2
  4. package/template/package.json +2 -7
  5. package/template/tsconfig.json +1 -2
  6. package/template/apps/mobile/.vscode/extensions.json +0 -1
  7. package/template/apps/mobile/.vscode/settings.json +0 -7
  8. package/template/apps/mobile/README.md +0 -50
  9. package/template/apps/mobile/app/(tabs)/_layout.tsx +0 -43
  10. package/template/apps/mobile/app/(tabs)/account.tsx +0 -147
  11. package/template/apps/mobile/app/(tabs)/explore.tsx +0 -345
  12. package/template/apps/mobile/app/(tabs)/index.tsx +0 -112
  13. package/template/apps/mobile/app/_layout.tsx +0 -43
  14. package/template/apps/mobile/app/index.tsx +0 -129
  15. package/template/apps/mobile/app/login.tsx +0 -135
  16. package/template/apps/mobile/app/signup.tsx +0 -144
  17. package/template/apps/mobile/app.json +0 -56
  18. package/template/apps/mobile/assets/images/android-icon-background.png +0 -0
  19. package/template/apps/mobile/assets/images/android-icon-foreground.png +0 -0
  20. package/template/apps/mobile/assets/images/android-icon-monochrome.png +0 -0
  21. package/template/apps/mobile/assets/images/favicon.png +0 -0
  22. package/template/apps/mobile/assets/images/icon.png +0 -0
  23. package/template/apps/mobile/assets/images/partial-react-logo.png +0 -0
  24. package/template/apps/mobile/assets/images/react-logo.png +0 -0
  25. package/template/apps/mobile/assets/images/react-logo@2x.png +0 -0
  26. package/template/apps/mobile/assets/images/react-logo@3x.png +0 -0
  27. package/template/apps/mobile/assets/images/splash-icon.png +0 -0
  28. package/template/apps/mobile/components/external-link.tsx +0 -25
  29. package/template/apps/mobile/components/haptic-tab.tsx +0 -18
  30. package/template/apps/mobile/components/hello-wave.tsx +0 -20
  31. package/template/apps/mobile/components/parallax-scroll-view.tsx +0 -81
  32. package/template/apps/mobile/components/themed-text.tsx +0 -60
  33. package/template/apps/mobile/components/themed-view.tsx +0 -14
  34. package/template/apps/mobile/components/ui/button.tsx +0 -86
  35. package/template/apps/mobile/components/ui/collapsible.tsx +0 -46
  36. package/template/apps/mobile/components/ui/icon-symbol.ios.tsx +0 -32
  37. package/template/apps/mobile/components/ui/icon-symbol.tsx +0 -41
  38. package/template/apps/mobile/components/ui/input.tsx +0 -56
  39. package/template/apps/mobile/constants/theme.ts +0 -53
  40. package/template/apps/mobile/hooks/use-color-scheme.ts +0 -1
  41. package/template/apps/mobile/hooks/use-color-scheme.web.ts +0 -21
  42. package/template/apps/mobile/hooks/use-theme-color.ts +0 -21
  43. package/template/apps/mobile/lib/auth-client.ts +0 -14
  44. package/template/apps/mobile/lib/orpc.ts +0 -28
  45. package/template/apps/mobile/package.json +0 -57
  46. package/template/apps/mobile/scripts/reset-project.js +0 -112
  47. package/template/apps/mobile/tsconfig.json +0 -13
@@ -1,112 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * This script is used to reset the project to a blank state.
5
- * It deletes or moves the /app, /components, /hooks, /scripts, and /constants directories to /app-example based on user input and creates a new /app directory with an index.tsx and _layout.tsx file.
6
- * You can remove the `reset-project` script from package.json and safely delete this file after running it.
7
- */
8
-
9
- const fs = require("fs");
10
- const path = require("path");
11
- const readline = require("readline");
12
-
13
- const root = process.cwd();
14
- const oldDirs = ["app", "components", "hooks", "constants", "scripts"];
15
- const exampleDir = "app-example";
16
- const newAppDir = "app";
17
- const exampleDirPath = path.join(root, exampleDir);
18
-
19
- const indexContent = `import { Text, View } from "react-native";
20
-
21
- export default function Index() {
22
- return (
23
- <View
24
- style={{
25
- flex: 1,
26
- justifyContent: "center",
27
- alignItems: "center",
28
- }}
29
- >
30
- <Text>Edit app/index.tsx to edit this screen.</Text>
31
- </View>
32
- );
33
- }
34
- `;
35
-
36
- const layoutContent = `import { Stack } from "expo-router";
37
-
38
- export default function RootLayout() {
39
- return <Stack />;
40
- }
41
- `;
42
-
43
- const rl = readline.createInterface({
44
- input: process.stdin,
45
- output: process.stdout,
46
- });
47
-
48
- const moveDirectories = async (userInput) => {
49
- try {
50
- if (userInput === "y") {
51
- // Create the app-example directory
52
- await fs.promises.mkdir(exampleDirPath, { recursive: true });
53
- console.log(`šŸ“ /${exampleDir} directory created.`);
54
- }
55
-
56
- // Move old directories to new app-example directory or delete them
57
- for (const dir of oldDirs) {
58
- const oldDirPath = path.join(root, dir);
59
- if (fs.existsSync(oldDirPath)) {
60
- if (userInput === "y") {
61
- const newDirPath = path.join(root, exampleDir, dir);
62
- await fs.promises.rename(oldDirPath, newDirPath);
63
- console.log(`āž”ļø /${dir} moved to /${exampleDir}/${dir}.`);
64
- } else {
65
- await fs.promises.rm(oldDirPath, { recursive: true, force: true });
66
- console.log(`āŒ /${dir} deleted.`);
67
- }
68
- } else {
69
- console.log(`āž”ļø /${dir} does not exist, skipping.`);
70
- }
71
- }
72
-
73
- // Create new /app directory
74
- const newAppDirPath = path.join(root, newAppDir);
75
- await fs.promises.mkdir(newAppDirPath, { recursive: true });
76
- console.log("\nšŸ“ New /app directory created.");
77
-
78
- // Create index.tsx
79
- const indexPath = path.join(newAppDirPath, "index.tsx");
80
- await fs.promises.writeFile(indexPath, indexContent);
81
- console.log("šŸ“„ app/index.tsx created.");
82
-
83
- // Create _layout.tsx
84
- const layoutPath = path.join(newAppDirPath, "_layout.tsx");
85
- await fs.promises.writeFile(layoutPath, layoutContent);
86
- console.log("šŸ“„ app/_layout.tsx created.");
87
-
88
- console.log("\nāœ… Project reset complete. Next steps:");
89
- console.log(
90
- `1. Run \`npx expo start\` to start a development server.\n2. Edit app/index.tsx to edit the main screen.${
91
- userInput === "y"
92
- ? `\n3. Delete the /${exampleDir} directory when you're done referencing it.`
93
- : ""
94
- }`,
95
- );
96
- } catch (error) {
97
- console.error(`āŒ Error during script execution: ${error.message}`);
98
- }
99
- };
100
-
101
- rl.question(
102
- "Do you want to move existing files to /app-example instead of deleting them? (Y/n): ",
103
- (answer) => {
104
- const userInput = answer.trim().toLowerCase() || "y";
105
- if (userInput === "y" || userInput === "n") {
106
- moveDirectories(userInput).finally(() => rl.close());
107
- } else {
108
- console.log("āŒ Invalid input. Please enter 'Y' or 'N'.");
109
- rl.close();
110
- }
111
- },
112
- );
@@ -1,13 +0,0 @@
1
- {
2
- "extends": [
3
- "expo/tsconfig.base",
4
- "@workspace/config-typescript/react.json"
5
- ],
6
- "compilerOptions": {
7
- "strict": true,
8
- "paths": {
9
- "@/*": ["./*"]
10
- }
11
- },
12
- "include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"]
13
- }