Skip to content

Commit f89eabb

Browse files
chinesedfandyesseyumba
authored andcommitted
chore: fix yarn run link (gitpoint#513)
* chore(fonts): Not link all fonts from react-native-vector-icons * fix(fonts): Add the missing Menlo * fix(cli): Fix for RN 0.48 * chore(cli): Run `yarn run link` again
1 parent 3415486 commit f89eabb

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

ios/GitPoint.xcodeproj/project.pbxproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
};
66
objectVersion = 46;
77
objects = {
8-
98
/* Begin PBXBuildFile section */
109
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
1110
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
@@ -51,6 +50,7 @@
5150
B58367881AB44EC4944D4698 /* Nunito-Italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E37A1EB69E2D4FD7B138343D /* Nunito-Italic.ttf */; };
5251
B66611A59CDF49A19C845B57 /* Nunito-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 78A9FAE6B34B4FAC9F27CBC3 /* Nunito-Regular.ttf */; };
5352
B8D599F61D2A4797A2F71CAA /* libRNVectorIcons.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AFDBB5669CAB4C5C8215B571 /* libRNVectorIcons.a */; };
53+
D2C2FCD70676466EA8E466D6 /* Menlo.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 18487F5E165143648CF0950E /* Menlo.ttf */; };
5454
DC5C35E71E37AD1800F3F526 /* FontAwesome.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DC5C35DD1E37AD1800F3F526 /* FontAwesome.ttf */; };
5555
EB0F176BE52B4561B9FF07AB /* libReactNativeConfig.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D7043BDB577E427391ECFBB0 /* libReactNativeConfig.a */; };
5656
/* End PBXBuildFile section */
@@ -343,6 +343,7 @@
343343
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = GitPoint/Info.plist; sourceTree = "<group>"; };
344344
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = GitPoint/main.m; sourceTree = "<group>"; };
345345
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
346+
18487F5E165143648CF0950E /* Menlo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Menlo.ttf; path = ../src/assets/fonts/Menlo.ttf; sourceTree = "<group>"; };
346347
1ABB0D8AB2424B1595DABB16 /* libRNPhotoView.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNPhotoView.a; sourceTree = "<group>"; };
347348
24C757CE6CB049658C31ED0E /* Nunito-Bold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-Bold.ttf"; path = "../src/assets/fonts/Nunito-Bold.ttf"; sourceTree = "<group>"; };
348349
27CFE4061F920B7700951EF2 /* MaterialIcons.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = MaterialIcons.ttf; sourceTree = "<group>"; };
@@ -557,6 +558,7 @@
557558
ED1B22A89E134AA89E251577 /* Nunito-Light.ttf */,
558559
78A9FAE6B34B4FAC9F27CBC3 /* Nunito-Regular.ttf */,
559560
FBD0F4CBD299403498005E08 /* Nunito-SemiBold.ttf */,
561+
18487F5E165143648CF0950E /* Menlo.ttf */,
560562
);
561563
name = Resources;
562564
sourceTree = "<group>";
@@ -1233,6 +1235,7 @@
12331235
5DC6C311356B4973AE2599BF /* Nunito-Light.ttf in Resources */,
12341236
B66611A59CDF49A19C845B57 /* Nunito-Regular.ttf in Resources */,
12351237
4A0E0CE9909244398A873436 /* Nunito-SemiBold.ttf in Resources */,
1238+
D2C2FCD70676466EA8E466D6 /* Menlo.ttf in Resources */,
12361239
);
12371240
runOnlyForDeploymentPostprocessing = 0;
12381241
};

ios/GitPoint/Info.plist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</dict>
5050
</dict>
5151
<key>NSLocationWhenInUseUsageDescription</key>
52-
<string></string>
52+
<string/>
5353
<key>UIAppFonts</key>
5454
<array>
5555
<string>FontAwesome.ttf</string>
@@ -60,6 +60,7 @@
6060
<string>Nunito-Light.ttf</string>
6161
<string>Nunito-Regular.ttf</string>
6262
<string>Nunito-SemiBold.ttf</string>
63+
<string>Menlo.ttf</string>
6364
</array>
6465
<key>UIRequiredDeviceCapabilities</key>
6566
<array>

rn-cli.config.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Inspired by react-native/local-cli/core/index.js
2+
3+
const android = require('react-native/local-cli/core/android');
4+
const ios = require('react-native/local-cli/core/ios');
5+
const windows = require('react-native/local-cli/core/windows');
6+
const findAssets = require('react-native/local-cli/core/findAssets');
7+
const wrapCommands = require('react-native/local-cli/core/wrapCommands');
8+
9+
const path = require('path');
10+
11+
const getRNPMConfig = folder =>
12+
// eslint-disable-next-line import/no-dynamic-require
13+
require(path.join(folder, './package.json')).rnpm || {};
14+
15+
const config = {
16+
getDependencyConfig(packageName) {
17+
const folder = path.join(process.cwd(), 'node_modules', packageName);
18+
const rnpm = getRNPMConfig(
19+
path.join(process.cwd(), 'node_modules', packageName)
20+
);
21+
22+
if (packageName === 'react-native-vector-icons') {
23+
// we do not need link all fonts from it, #402
24+
rnpm.assets = [];
25+
}
26+
27+
return Object.assign({}, rnpm, {
28+
ios: ios.dependencyConfig(folder, rnpm.ios || {}),
29+
android: android.dependencyConfig(folder, rnpm.android || {}),
30+
windows: windows.dependencyConfig(folder, rnpm.windows || {}),
31+
assets: findAssets(folder, rnpm.assets),
32+
commands: wrapCommands(rnpm.commands),
33+
params: rnpm.params || [],
34+
});
35+
},
36+
};
37+
38+
module.exports = config;

0 commit comments

Comments
 (0)