Skip to content

Commit 291e516

Browse files
committed
fix: resolve alias, babel.config.js, JavaScriptCore.framework and so on
1 parent 41e684d commit 291e516

File tree

8 files changed

+2462
-1727
lines changed

8 files changed

+2462
-1727
lines changed

.eslintrc.js

-12
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,7 @@ module.exports = {
2020
'babel-module': {
2121
root: ['./src'],
2222
alias: {
23-
api: 'api',
24-
auth: 'auth',
25-
components: 'components',
26-
config: 'config',
27-
issue: 'issue',
28-
locale: 'locale',
29-
notifications: 'notifications',
30-
organization: 'organization',
31-
repository: 'repository',
32-
search: 'search',
3323
testData: './__tests__/data',
34-
user: 'user',
35-
utils: 'utils',
3624
},
3725
},
3826
},

AssetRegistry.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @format
8+
* strict
9+
*/
10+
module.exports = {
11+
registerAsset(data) {
12+
return data;
13+
},
14+
};

babel.config.js

+25-33
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,26 @@
1-
module.exports = {
2-
"presets": [
3-
"react-native",
4-
"flow"
5-
],
6-
"retainLines": true,
7-
"plugins": [
8-
[
9-
"module-resolver",
10-
{
11-
"root": [
12-
"./src"
13-
],
14-
"alias": {
15-
"api": "api",
16-
"auth": "auth",
17-
"components": "components",
18-
"config": "config",
19-
"issue": "issue",
20-
"locale": "locale",
21-
"notifications": "notifications",
22-
"organization": "organization",
23-
"package.json": "./package.json",
24-
"repository": "repository",
25-
"search": "search",
26-
"testData": "./__tests__/data",
27-
"user": "user",
28-
"utils": "utils"
29-
}
30-
}
1+
module.exports = api => {
2+
api.cache(true);
3+
4+
return {
5+
"presets": [
6+
"module:metro-react-native-babel-preset",
7+
"@babel/preset-flow"
318
],
32-
"transform-inline-environment-variables"
33-
]
34-
}
9+
"retainLines": true,
10+
"plugins": [
11+
[
12+
"module-resolver",
13+
{
14+
"root": [
15+
"./src"
16+
],
17+
"alias": {
18+
"package.json": "./package.json",
19+
"testData": "./__tests__/data"
20+
}
21+
}
22+
],
23+
"transform-inline-environment-variables"
24+
]
25+
};
26+
};

ios/GitPoint.xcodeproj/project.pbxproj

+101-63
Large diffs are not rendered by default.

ios/GitPoint/Info.plist

+12-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<key>CFBundleExecutable</key>
1010
<string>$(EXECUTABLE_NAME)</string>
1111
<key>CFBundleIdentifier</key>
12-
<string>com.houssein.GitPoint</string>
12+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
1313
<key>CFBundleInfoDictionaryVersion</key>
1414
<string>6.0</string>
1515
<key>CFBundleName</key>
@@ -35,6 +35,8 @@
3535
</array>
3636
<key>CFBundleVersion</key>
3737
<string>8</string>
38+
<key>CodePushDeploymentKey</key>
39+
<string>__RN_CONFIG_CODEPUSH_IOS_DEPLOYMENT_KEY</string>
3840
<key>LSRequiresIPhoneOS</key>
3941
<true/>
4042
<key>NSAppTransportSecurity</key>
@@ -49,7 +51,7 @@
4951
</dict>
5052
</dict>
5153
<key>NSLocationWhenInUseUsageDescription</key>
52-
<string/>
54+
<string></string>
5355
<key>UIAppFonts</key>
5456
<array>
5557
<string>FontAwesome.ttf</string>
@@ -62,6 +64,14 @@
6264
<string>Nunito-SemiBold.ttf</string>
6365
<string>Menlo.ttf</string>
6466
<string>Inconsolata-Regular.ttf</string>
67+
<string>Entypo.ttf</string>
68+
<string>EvilIcons.ttf</string>
69+
<string>Feather.ttf</string>
70+
<string>Foundation.ttf</string>
71+
<string>Ionicons.ttf</string>
72+
<string>MaterialCommunityIcons.ttf</string>
73+
<string>SimpleLineIcons.ttf</string>
74+
<string>Zocial.ttf</string>
6575
</array>
6676
<key>UIRequiredDeviceCapabilities</key>
6777
<array>
@@ -85,7 +95,5 @@
8595
</array>
8696
<key>UIViewControllerBasedStatusBarAppearance</key>
8797
<false/>
88-
<key>CodePushDeploymentKey</key>
89-
<string>__RN_CONFIG_CODEPUSH_IOS_DEPLOYMENT_KEY</string>
9098
</dict>
9199
</plist>

metro.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
*
55
* @format
66
*/
7+
const path = require('path');
8+
79
module.exports = {
810
transformer: {
911
getTransformOptions: async () => ({
@@ -12,5 +14,6 @@ module.exports = {
1214
inlineRequires: false,
1315
},
1416
}),
17+
assetRegistryPath: path.resolve(__dirname, './AssetRegistry.js'),
1518
},
1619
};

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,14 @@
104104
},
105105
"devDependencies": {
106106
"@babel/core": "^7.4.5",
107+
"@babel/preset-flow": "^7.0.0",
107108
"@babel/runtime": "^7.4.5",
108109
"@commitlint/cli": "^3.1.0",
109110
"all-contributors-cli": "^4.10.1",
110111
"babel-eslint": "^10.0.1",
111112
"babel-jest": "^24.8.0",
112113
"babel-plugin-module-resolver": "^3.0.0",
113114
"babel-plugin-transform-inline-environment-variables": "^6.8.0",
114-
"babel-preset-flow": "^6.23.0",
115-
"babel-preset-react-native": "1.9.1",
116115
"babylon": "^6.18.0",
117116
"chalk": "^2.3.2",
118117
"concurrently": "^3.5.0",

0 commit comments

Comments
 (0)