-
Notifications
You must be signed in to change notification settings - Fork 2
/
clone.config.js
90 lines (89 loc) · 2.48 KB
/
clone.config.js
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
const cloneConfig = {
base: {
folder: '../rn_starter',
name: 'rn_starter',
package: 'com.rn_starter',
},
options: {
remove: true, // remove old cloned files, before new command clone
},
build_ios: ['npx react-native run-ios --configuration "Release"'],
build_android: [
'cd ./android',
'pwd',
// './gradlew cleanBuildCache',
'./gradlew assembleRelease',
],
exclude: [
'clone.config.js',
'node_modules',
'npm*',
'.git',
'.history',
'.vscode',
'.idea',
'.expo',
'.DS_Store',
'ignite',
'storybook',
'buck-out',
'.jsbundle',
'bin/Exponent.app',
'ios/Pods',
'android/.gralde',
'android/.idea',
'android/app/build',
'android/build',
'web-build',
'app/config/env.*.js',
],
copy_global: [
{
from: './ios/rn_starter/Images_${clone.nameProject}.xcassets',
to: './ios/rn_starter/Images.xcassets',
},
{
from: './android/app/src/main/res_${clone.nameProject}',
to: './android/app/src/main/res',
},
],
// replace_global: [
// {
// files: './android/app/build.gradle',
// from:
// '/(applicationId\\s*")(.+)(")/giu',
// to: ['$1${clone.package}$3'],
// },
// ],
clone: [
{
folder: '../rn_starter_company',
name: 'New AppName',
package: 'com.rn_starter.company',
// copy: [
// {
// from: './android/app/src/main/res_${clone.nameProject}',
// to: './android/app/src/main/res',
// },
// ],
},
{
folder: '../rn_starter_company2',
package: 'com.rn_starter.company2',
name: 'New AppName 2',
// copy: [
// {
// from:
// './android/app/src/main/res/playstore_${clone.nameProject}.png',
// to: './android/app/src/main/res/playstore.png',
// },
// ],
// replace: {
// files: './android/app/build.gradle',
// from: '/(applicationId\\s*")(.+)(")/giu',
// to: ['$1${clone.package}$3'],
// },
},
],
};
module.exports = cloneConfig;