create-ern-boilerplate 0.0.59 → 0.0.61

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/README.md CHANGED
@@ -13,8 +13,8 @@ Buat proyek **React Native Expo** production-ready dalam hitungan detik dengan b
13
13
  ✅ **Tidak perlu instalasi global** - langsung pakai dengan npx
14
14
  ✅ **Mode interaktif** - pilih template dan konfigurasi dengan mudah
15
15
  ✅ **Mode cepat** - buat project dalam satu baris perintah
16
- ✅ **Berbagai template** - minimal, redux, dan lainnya
17
- ✅ **Auto setup** - nama project, bundle identifier, dan dependencies otomatis terkonfigurasi
16
+ ✅ **Berbagai template** - dari yang sederhana hingga AI-ready & fullstack
17
+ ✅ **Auto setup** - nama project, bundle identifier, dan konfigurasi Expo otomatis terkonfigurasi
18
18
 
19
19
  ---
20
20
 
@@ -23,18 +23,24 @@ Buat proyek **React Native Expo** production-ready dalam hitungan detik dengan b
23
23
  Cara tercepat untuk membuat project baru:
24
24
 
25
25
  ```bash
26
- npx create-ern-boilerplate my-app -y
26
+ npx create-ern-boilerplate my-app --template default
27
27
  ```
28
28
 
29
29
  Atau gunakan alias yang lebih pendek:
30
30
 
31
31
  ```bash
32
- npx ern-boilerplate my-app -y
32
+ npx ern-boilerplate my-app --template default
33
33
  ```
34
34
 
35
- Selesai! Project kamu sudah siap dengan template default dan dependencies sudah terinstall.
35
+ Atau jalankan mode interaktif untuk memilih template:
36
36
 
37
- ### 🟢 Mode Interaktif (Direkomendasikan untuk pemula)
37
+ ```bash
38
+ npx create-ern-boilerplate
39
+ ```
40
+
41
+ ---
42
+
43
+ ## 🟢 Mode Interaktif (Direkomendasikan untuk pemula)
38
44
 
39
45
  Jalankan tanpa argumen untuk memilih konfigurasi secara interaktif:
40
46
 
@@ -51,59 +57,48 @@ Kamu akan ditanya:
51
57
  **Contoh interaksi:**
52
58
 
53
59
  ```
54
- ? Nama project kamu: my-expo-app
55
- ? Deskripsi singkat: Aplikasi keren dengan Expo
56
- ? Pilih template: redux
57
- ? Langsung install dependencies setelah membuat project? Yes
58
-
59
- Membuat project my-expo-app...
60
- 📦 Menginstall dependencies...
61
- ✅ Project berhasil dibuat!
60
+ ? Project name: my-expo-app
61
+ ? Short description: Aplikasi keren dengan Expo
62
+ ? Choose a template: default
63
+ ? Install dependencies automatically after creating the project? Yes
64
+
65
+ Template "default" has been created!
62
66
  ```
63
67
 
64
68
  ---
65
69
 
66
- ### 🟡 Mode Cepat (Direkomendasikan untuk yang sudah familiar)
70
+ ## 🟡 Mode Cepat (Direkomendasikan untuk yang sudah familiar)
67
71
 
68
72
  Langsung buat project baru tanpa pertanyaan:
69
73
 
70
74
  ```bash
71
- npx create-ern-boilerplate my-app -y
75
+ npx create-ern-boilerplate my-app -y --template default
72
76
  ```
73
77
 
74
78
  Atau dengan alias pendek:
75
79
 
76
80
  ```bash
77
- npx ern-boilerplate my-app -y
81
+ npx ern-boilerplate my-app -y --template default
78
82
  ```
79
83
 
80
- Hasilnya:
81
- - ✅ Otomatis pakai **template default (`minimal`)**
82
- - ✅ Dependencies langsung terinstall
83
- - ✅ Siap untuk development
84
-
85
- ---
84
+ > ⚠️ **Catatan:** Flag `-y` saja **tidak** otomatis menginstall dependencies. Tambahkan `--install` untuk auto-install.
86
85
 
87
- ### 🔵 Mode Kustom (Full control)
88
-
89
- Tentukan semua konfigurasi langsung di command line:
86
+ Dengan auto-install:
90
87
 
91
88
  ```bash
92
- npx create-ern-boilerplate my-app -y --desc "Boilerplate lengkap" --template redux
89
+ npx create-ern-boilerplate my-app -y --template default --install
93
90
  ```
94
91
 
95
- Atau dengan alias:
92
+ ---
93
+
94
+ ## 🔵 Mode Kustom (Full control)
95
+
96
+ Tentukan semua konfigurasi langsung di command line:
96
97
 
97
98
  ```bash
98
- npx ern-boilerplate my-app -y --desc "Boilerplate lengkap" --template redux
99
+ npx create-ern-boilerplate my-app -y --desc "Boilerplate lengkap" --template agent-generator --install
99
100
  ```
100
101
 
101
- Hasilnya:
102
- - 📁 Project **my-app** langsung terbuat
103
- - 📄 Deskripsi otomatis terisi
104
- - 🧩 Menggunakan template **redux**
105
- - ⚙️ Dependencies auto install
106
-
107
102
  ---
108
103
 
109
104
  ## ⚙️ Argumen & Opsi CLI
@@ -120,51 +115,62 @@ npx ern-boilerplate [nama-project] [opsi]
120
115
 
121
116
  | Opsi | Deskripsi | Default | Contoh |
122
117
  |------|-----------|---------|--------|
123
- | `[nama-project]` | Nama project yang akan dibuat | Akan ditanyakan jika tidak diisi | `my-app` |
118
+ | `[nama-project]` | Nama project yang akan dibuat | Ditanyakan interaktif | `my-app` |
124
119
  | `-y`, `--yes` | Mode cepat tanpa prompt | `false` | `npx create-ern-boilerplate my-app -y` |
125
- | `--desc <text>` | Deskripsi project | `""` | `--desc "Aplikasi keren"` |
126
- | `--template <name>` | Pilih template tertentu | `minimal` | `--template redux` |
127
- | `--install` | Auto install dependencies | `true` saat `-y` | `-y --install` |
120
+ | `--template <name>` | Pilih template tertentu | Ditanyakan interaktif | `--template default` |
121
+ | `--desc <text>` | Deskripsi project | `"Expo React Native project"` | `--desc "Aplikasi keren"` |
122
+ | `--install` | Auto install dependencies | `false` | `--install` |
123
+
124
+ > ⚠️ **Penting saat pakai `-y`:** Nama project **wajib** disertakan. Jika tidak, CLI akan berhenti dengan pesan error.
128
125
 
129
126
  ### Contoh kombinasi:
130
127
 
131
128
  ```bash
132
- # Hanya nama project
129
+ # Mode interaktif penuh
130
+ npx create-ern-boilerplate
131
+
132
+ # Hanya isi nama project, sisanya interaktif
133
133
  npx create-ern-boilerplate my-app
134
134
 
135
- # Mode cepat
136
- npx ern-boilerplate my-app -y
135
+ # Fast mode dengan template tertentu
136
+ npx ern-boilerplate my-app -y --template default
137
137
 
138
- # Custom template
139
- npx create-ern-boilerplate my-app -y --template redux
138
+ # Fast mode dengan auto-install
139
+ npx create-ern-boilerplate my-app -y --template agent-generator --install
140
140
 
141
141
  # Full custom
142
- npx ern-boilerplate my-app -y --desc "My awesome app" --template redux
142
+ npx ern-boilerplate my-app -y --desc "My awesome app" --template advanced --install
143
143
  ```
144
144
 
145
145
  ---
146
146
 
147
147
  ## 🧩 Template yang Tersedia
148
148
 
149
- Saat ini tersedia beberapa template siap pakai:
150
-
151
149
  | Template | Deskripsi | Cocok untuk |
152
150
  |----------|-----------|-------------|
153
- | `minimal` | Template dasar dengan struktur minimalis | Project sederhana, prototyping cepat |
154
- | `redux` | Lengkap dengan Redux state management | Aplikasi kompleks dengan state management |
155
- | `default` | Template standar dengan setup umum | Kebanyakan project |
151
+ | `default` | Production-ready dengan auth, theming, TypeScript, multi-env (staging/prod) | Kebanyakan project baru |
152
+ | `advanced` | Seperti `default` dengan NativeWind & arsitektur lebih lengkap | Project dengan UI kompleks |
153
+ | `simple` | Seperti `default` dilengkapi AI development guide | Project dengan AI-assisted dev |
154
+ | `improved` | Versi ringkas tanpa multi-env, setup minimal | Prototyping cepat |
155
+ | `default_draft` | Draft awal struktur dasar | Eksplorasi struktur |
156
+ | `agent-generator` | Dioptimalkan untuk AI code generation, dilengkapi contoh kode & panduan AI | Project dengan heavy AI workflow |
157
+ | `agent-generator-fullstack` | Seperti `agent-generator` tapi menghasilkan struktur `frontend/` + `backend/` | Fullstack project |
158
+ | `starter-kit-news` | Starter kit aplikasi berita lengkap dengan auth, API, dan UI siap pakai | News / content app |
156
159
 
157
160
  ### Cara menggunakan template:
158
161
 
159
162
  ```bash
160
- # Template minimal (default)
161
- npx create-ern-boilerplate my-app -y
162
-
163
- # Template redux
164
- npx create-ern-boilerplate my-app -y --template redux
165
-
166
163
  # Template default
167
164
  npx create-ern-boilerplate my-app -y --template default
165
+
166
+ # Template dengan AI workflow
167
+ npx create-ern-boilerplate my-app -y --template agent-generator
168
+
169
+ # Template fullstack (menghasilkan folder frontend/ + backend/)
170
+ npx create-ern-boilerplate my-app -y --template agent-generator-fullstack
171
+
172
+ # Template news app
173
+ npx create-ern-boilerplate my-app -y --template starter-kit-news
168
174
  ```
169
175
 
170
176
  ---
@@ -177,11 +183,12 @@ Saat kamu menjalankan `npx create-ern-boilerplate`, ini yang terjadi:
177
183
  2. **⚙️ CLI membaca argumen** - Memproses command dan opsi yang kamu berikan
178
184
  3. **💬 Mode interaktif (opsional)** - Menampilkan prompt jika kamu tidak pakai flag `-y`
179
185
  4. **📋 Copy template** - Template yang dipilih disalin ke folder project baru
180
- 5. **✏️ Auto-configure** - Update `package.json` dan `app.json` dengan:
186
+ 5. **✏️ Auto-configure** - Update `package.json` dan `app.json` / `app.config.js` dengan:
181
187
  - Nama project kamu
182
188
  - Deskripsi project
183
189
  - Bundle identifier untuk iOS & Android
184
- 6. **📦 Install dependencies** - npm install otomatis dijalankan
190
+ - Scheme untuk deep linking
191
+ 6. **📦 Install dependencies** (opsional) - Dijalankan jika flag `--install` disertakan
185
192
  7. **✅ Selesai!** - Project siap untuk development
186
193
 
187
194
  ---
@@ -191,34 +198,54 @@ Saat kamu menjalankan `npx create-ern-boilerplate`, ini yang terjadi:
191
198
  Setelah menjalankan perintah:
192
199
 
193
200
  ```bash
194
- npx create-ern-boilerplate my-expo-app -y --template redux
201
+ npx create-ern-boilerplate my-expo-app -y --template default --install
195
202
  ```
196
203
 
197
204
  Kamu akan mendapatkan struktur project seperti ini:
198
205
 
199
206
  ```
200
207
  my-expo-app/
201
- ├── 📱 app.json # Konfigurasi Expo
202
- ├── 📦 package.json # Dependencies & scripts
203
- ├── 🚀 App.js # Entry point aplikasi
204
- ├── 📁 src/
205
- ├── components/ # React components
206
- │ ├── screens/ # Screen components
207
- │ ├── redux/ # Redux store & slices
208
- └── ...
209
- └── ...
208
+ ├── app/ # Expo Router (file-based routing)
209
+ ├── (auth)/ # Auth screens (login, register)
210
+ ├── (tabs)/ # Tab navigation screens
211
+ │ └── _layout.tsx
212
+ ├── src/
213
+ │ ├── assets/ # Images, fonts
214
+ │ ├── components/ # Reusable UI components
215
+ ├── hooks/ # Custom hooks
216
+ │ ├── services/ # API calls & business logic
217
+ │ ├── theme/ # Colors, typography
218
+ │ ├── types/ # TypeScript types
219
+ │ └── utils/ # Helper functions
220
+ ├── server/ # Mock API server
221
+ ├── app.json # Konfigurasi Expo (development)
222
+ ├── app.staging.json # Konfigurasi staging
223
+ ├── app.prod.json # Konfigurasi production
224
+ ├── babel.config.js
225
+ ├── metro.config.js
226
+ └── tsconfig.json
210
227
  ```
211
228
 
229
+ > Untuk template `agent-generator-fullstack`, struktur yang dihasilkan adalah:
230
+ > ```
231
+ > my-expo-app/
232
+ > ├── frontend/ # Expo React Native app
233
+ > └── backend/ # Backend project
234
+ > ```
235
+
212
236
  ### Langkah selanjutnya:
213
237
 
214
238
  ```bash
215
239
  # Masuk ke folder project
216
240
  cd my-expo-app
217
241
 
242
+ # Jika belum install dependencies
243
+ npm install
244
+
218
245
  # Jalankan development server
219
246
  npm start
220
247
 
221
- # Atau langsung ke iOS/Android
248
+ # Atau langsung ke platform tertentu
222
249
  npm run ios
223
250
  npm run android
224
251
  ```
@@ -228,19 +255,19 @@ npm run android
228
255
  ## 💡 Tips & Best Practices
229
256
 
230
257
  ### Untuk pengguna baru:
231
- - 🎯 Mulai dengan mode interaktif terlebih dahulu: `npx create-ern-boilerplate`
232
- - 📚 Gunakan template `minimal` untuk belajar struktur dasar
233
- - 🔍 Eksplorasi file yang di-generate untuk memahami setup-nya
258
+ - 🎯 Mulai dengan mode interaktif: `npx create-ern-boilerplate`
259
+ - 📚 Gunakan template `default` untuk struktur project yang sudah teruji
260
+ - 🔍 Baca file dokumentasi di dalam template (AI_GUIDE.md, README.md) sebelum mulai coding
234
261
 
235
262
  ### Untuk pengguna berpengalaman:
236
- - ⚡ Gunakan alias pendek: `npx ern-boilerplate my-app -y`
237
- - 🎨 Kombinasikan dengan opsi custom untuk workflow lebih cepat
238
- - 🔧 Template `redux` cocok untuk aplikasi dengan state management kompleks
263
+ - ⚡ Gunakan alias pendek: `npx ern-boilerplate my-app -y --template default --install`
264
+ - 🤖 Gunakan `agent-generator` jika kamu banyak pakai AI (Claude, Cursor, Copilot) untuk generate kode
265
+ - 🗞️ Gunakan `starter-kit-news` jika ingin starter app yang langsung jalan
239
266
 
240
267
  ### Performa:
241
268
  - ✨ npx selalu menggunakan versi terbaru dari registry
242
269
  - 🚀 Gunakan flag `-y` untuk skip semua prompt
243
- - 📦 Dependencies otomatis terinstall saat menggunakan `-y`
270
+ - 📦 Tambahkan `--install` agar dependencies langsung terinstall
244
271
 
245
272
  ---
246
273
 
@@ -281,4 +308,4 @@ Jika tool ini membantu kamu, jangan lupa:
281
308
 
282
309
  ---
283
310
 
284
- **Happy Coding! 🚀**
311
+ **Happy Coding! 🚀**
package/create.js CHANGED
@@ -121,6 +121,14 @@ async function main() {
121
121
  if (await fs.pathExists(gitignoreTemplatePath)) {
122
122
  await fs.move(gitignoreTemplatePath, gitignorePath);
123
123
  }
124
+
125
+ // Handle .npmrc-template in frontend/
126
+ const npmrcTemplatePath = path.join(frontendDir, ".npmrc-template");
127
+ const npmrcPath = path.join(frontendDir, ".npmrc");
128
+
129
+ if (await fs.pathExists(npmrcTemplatePath)) {
130
+ await fs.move(npmrcTemplatePath, npmrcPath);
131
+ }
124
132
  } else {
125
133
  // Normal template copy
126
134
  await fs.copy(templateDir, targetDir);
@@ -132,6 +140,14 @@ async function main() {
132
140
  if (await fs.pathExists(gitignoreTemplatePath)) {
133
141
  await fs.move(gitignoreTemplatePath, gitignorePath);
134
142
  }
143
+
144
+ // === Rename .npmrc-template → .npmrc ===
145
+ const npmrcTemplatePath = path.join(targetDir, ".npmrc-template");
146
+ const npmrcPath = path.join(targetDir, ".npmrc");
147
+
148
+ if (await fs.pathExists(npmrcTemplatePath)) {
149
+ await fs.move(npmrcTemplatePath, npmrcPath);
150
+ }
135
151
  }
136
152
 
137
153
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ern-boilerplate",
3
- "version": "0.0.59",
3
+ "version": "0.0.61",
4
4
  "description": "Expo React Native boilerplate generator",
5
5
  "bin": {
6
6
  "create-ern-boilerplate": "./create.js",
@@ -0,0 +1 @@
1
+ node-linker=hoisted
@@ -0,0 +1 @@
1
+ node-linker=hoisted