-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtemplate.config.js
More file actions
54 lines (50 loc) · 1.78 KB
/
template.config.js
File metadata and controls
54 lines (50 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
module.exports = {
// Name of the template
name: "react-native-template",
// Description of the template
description: "A modern, feature-rich React Native template built with Expo",
// Placeholders that will be replaced in the template files
placeholders: {
"my-template-app": {
description: "Name of your project in title case, used in various places like app.json and package.json",
default: "myapp",
},
"my-template-project": {
description: "Name of your project in kebab-case, used for directory names and URLs",
default: "my-app",
},
"com.mytemplateproject": {
description:
"Bundle identifier for iOS and Android package name - must be unique and follow reverse domain notation",
default: "com.myapp",
},
},
// Post-initialization script to ensure proper configuration synchronization
postInitScript: {
description: "Validates that app.json configurations are properly synchronized",
validations: [
{
file: "app.json",
checks: [
{
path: "expo.scheme",
shouldMatch: "mytemplateproject",
description: "App scheme should match the lowercase project name",
},
{
path: "expo.ios.bundleIdentifier",
shouldMatch: "com.mytemplateproject",
description: "iOS bundle identifier should match the bundle identifier placeholder",
},
{
path: "expo.android.package",
shouldMatch: "com.mytemplateproject",
description: "Android package should match the bundle identifier placeholder",
},
],
},
],
},
// Files to ignore when creating a new project
ignoreFiles: [".git/**/*", "node_modules/**/*", ".github/**/*", "LICENSE"],
};