create-turniza-app 1.0.3 → 1.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-turniza-app",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "CLI scaffold for creating new Turniza monorepo apps (Flutter + Astro + Cloudflare Workers)",
5
5
  "type": "module",
6
6
  "bin": {
package/src/scaffold.ts CHANGED
@@ -90,6 +90,13 @@ export async function scaffoldProject(options: ProjectOptions): Promise<void> {
90
90
  if (options.includeMobile) {
91
91
  console.log(chalk.cyan('📦 Installing Flutter dependencies...'));
92
92
  await exec('flutter pub get', { cwd: join(targetDir, 'apps', 'mobile') });
93
+
94
+ console.log(chalk.cyan('🍫 Installing CocoaPods...'));
95
+ try {
96
+ await exec('pod install', { cwd: join(targetDir, 'apps', 'mobile', 'ios') });
97
+ } catch {
98
+ console.log(chalk.yellow(' ⚠️ pod install failed, run it manually if targeting iOS'));
99
+ }
93
100
  }
94
101
 
95
102
  if (options.includeWeb) {
@@ -97,6 +104,17 @@ export async function scaffoldProject(options: ProjectOptions): Promise<void> {
97
104
  await exec('bun install', { cwd: join(targetDir, 'apps', 'web') });
98
105
  }
99
106
 
107
+ // Auto-format generated code so `make ci` passes immediately
108
+ if (options.includeMobile) {
109
+ console.log(chalk.cyan('✨ Formatting Dart code...'));
110
+ await exec('dart format .', { cwd: join(targetDir, 'apps', 'mobile') });
111
+ }
112
+
113
+ if (options.includeWeb) {
114
+ console.log(chalk.cyan('✨ Formatting web code...'));
115
+ await exec('bun run format', { cwd: join(targetDir, 'apps', 'web') });
116
+ }
117
+
100
118
  console.log(chalk.cyan('🪝 Installing lefthook...'));
101
119
  try {
102
120
  await exec('lefthook install', { cwd: targetDir });
@@ -1,6 +1,6 @@
1
1
  import 'package:flutter_test/flutter_test.dart';
2
- import 'package:{{projectNameSnake}}/main.dart';
3
2
  import 'package:integration_test/integration_test.dart';
3
+ import 'package:{{projectNameSnake}}/main.dart';
4
4
 
5
5
  void main() {
6
6
  IntegrationTestWidgetsFlutterBinding.ensureInitialized();
@@ -1,5 +1,5 @@
1
- # Uncomment this line to define a global platform for your project
2
- # platform :ios, '13.0'
1
+ # Define a global platform for your project
2
+ platform :ios, '13.0'
3
3
 
4
4
  # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5
5
  ENV['COCOAPODS_DISABLE_STATS'] = 'true'