Skip to content

Commit 2b1a72b

Browse files
author
Transformhub
committed
dev
0 parents  commit 2b1a72b

File tree

81 files changed

+11462
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+11462
-0
lines changed

.buckconfig

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
[android]
3+
target = Google Inc.:Google APIs:23
4+
5+
[maven_repositories]
6+
central = https://repo1.maven.org/maven2

.eslintrc.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
parser: '@typescript-eslint/parser',
5+
plugins: ['@typescript-eslint'],
6+
overrides: [
7+
{
8+
files: ['*.ts', '*.tsx'],
9+
rules: {
10+
'@typescript-eslint/no-shadow': ['error'],
11+
'no-shadow': 'off',
12+
'no-undef': 'off',
13+
},
14+
},
15+
],
16+
};

.gitignore

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
ios/.xcode.env.local
24+
25+
# Android/IntelliJ
26+
#
27+
build/
28+
.idea
29+
.gradle
30+
local.properties
31+
*.iml
32+
*.hprof
33+
34+
# node.js
35+
#
36+
node_modules/
37+
npm-debug.log
38+
yarn-error.log
39+
40+
# BUCK
41+
buck-out/
42+
\.buckd/
43+
*.keystore
44+
!debug.keystore
45+
46+
# fastlane
47+
#
48+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
49+
# screenshots whenever they are needed.
50+
# For more information about the recommended setup visit:
51+
# https://docs.fastlane.tools/best-practices/source-control/
52+
53+
**/fastlane/report.xml
54+
**/fastlane/Preview.html
55+
**/fastlane/screenshots
56+
**/fastlane/test_output
57+
58+
# Bundle artifact
59+
*.jsbundle
60+
61+
# Ruby / CocoaPods
62+
/ios/Pods/
63+
/vendor/bundle/

.prettierrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
4+
bracketSpacing: false,
5+
singleQuote: true,
6+
trailingComma: 'all',
7+
};

.watchmanconfig

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

App.tsx

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*
5+
* Generated with the TypeScript template
6+
* https://github.com/react-native-community/react-native-template-typescript
7+
*
8+
* @format
9+
*/
10+
11+
import React, {type PropsWithChildren} from 'react';
12+
import {
13+
SafeAreaView,
14+
ScrollView,
15+
StatusBar,
16+
StyleSheet,
17+
Text,
18+
useColorScheme,
19+
View,
20+
} from 'react-native';
21+
22+
import {
23+
Colors,
24+
DebugInstructions,
25+
Header,
26+
LearnMoreLinks,
27+
ReloadInstructions,
28+
} from 'react-native/Libraries/NewAppScreen';
29+
import ThubView from './js/ThubViewNativeComponent';
30+
31+
const Section: React.FC<
32+
PropsWithChildren<{
33+
title: string;
34+
}>
35+
> = ({children, title}) => {
36+
const isDarkMode = useColorScheme() === 'dark';
37+
return (
38+
<View style={styles.sectionContainer}>
39+
<Text
40+
style={[
41+
styles.sectionTitle,
42+
{
43+
color: isDarkMode ? Colors.white : Colors.black,
44+
},
45+
]}>
46+
{title}
47+
</Text>
48+
<Text
49+
style={[
50+
styles.sectionDescription,
51+
{
52+
color: isDarkMode ? Colors.light : Colors.dark,
53+
},
54+
]}>
55+
{children}
56+
</Text>
57+
</View>
58+
);
59+
};
60+
61+
const App = () => {
62+
const isDarkMode = useColorScheme() === 'dark';
63+
64+
const backgroundStyle = {
65+
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
66+
};
67+
68+
return (
69+
<SafeAreaView style={backgroundStyle}>
70+
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
71+
<ScrollView
72+
contentInsetAdjustmentBehavior="automatic"
73+
style={backgroundStyle}>
74+
<ThubView
75+
style={{margin: 20, width: 100, height: 100}}
76+
color={'#00A0FF'}
77+
/>
78+
<Header />
79+
<View
80+
style={{
81+
backgroundColor: isDarkMode ? Colors.black : Colors.white,
82+
}}>
83+
<Section title="Step One">
84+
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
85+
screen and then come back to see your edits.
86+
</Section>
87+
<Section title="See Your Changes">
88+
<ReloadInstructions />
89+
</Section>
90+
<Section title="Debug">
91+
<DebugInstructions />
92+
</Section>
93+
<Section title="Learn More">
94+
Read the docs to discover what to do next:
95+
</Section>
96+
<LearnMoreLinks />
97+
</View>
98+
</ScrollView>
99+
</SafeAreaView>
100+
);
101+
};
102+
103+
const styles = StyleSheet.create({
104+
sectionContainer: {
105+
marginTop: 32,
106+
paddingHorizontal: 24,
107+
},
108+
sectionTitle: {
109+
fontSize: 24,
110+
fontWeight: '600',
111+
},
112+
sectionDescription: {
113+
marginTop: 8,
114+
fontSize: 18,
115+
fontWeight: '400',
116+
},
117+
highlight: {
118+
fontWeight: '700',
119+
},
120+
});
121+
122+
export default App;

Gemfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source 'https://rubygems.org'
2+
3+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4+
ruby '2.7.5'
5+
6+
gem 'cocoapods', '~> 1.11', '>= 1.11.2'

__tests__/App-test.tsx

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* @format
3+
*/
4+
5+
import 'react-native';
6+
import React from 'react';
7+
import App from '../App';
8+
9+
// Note: test renderer must be required after react-native.
10+
import renderer from 'react-test-renderer';
11+
12+
it('renders correctly', () => {
13+
renderer.create(<App />);
14+
});

_bundle/config

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

_ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.7.5

android/app/_BUCK

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# To learn about Buck see [Docs](https://buckbuild.com/).
2+
# To run your application with Buck:
3+
# - install Buck
4+
# - `npm start` - to start the packager
5+
# - `cd android`
6+
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7+
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8+
# - `buck install -r android/app` - compile, install and run application
9+
#
10+
11+
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12+
13+
lib_deps = []
14+
15+
create_aar_targets(glob(["libs/*.aar"]))
16+
17+
create_jar_targets(glob(["libs/*.jar"]))
18+
19+
android_library(
20+
name = "all-libs",
21+
exported_deps = lib_deps,
22+
)
23+
24+
android_library(
25+
name = "app-code",
26+
srcs = glob([
27+
"src/main/java/**/*.java",
28+
]),
29+
deps = [
30+
":all-libs",
31+
":build_config",
32+
":res",
33+
],
34+
)
35+
36+
android_build_config(
37+
name = "build_config",
38+
package = "com.fabricswift",
39+
)
40+
41+
android_resource(
42+
name = "res",
43+
package = "com.fabricswift",
44+
res = "src/main/res",
45+
)
46+
47+
android_binary(
48+
name = "app",
49+
keystore = "//android/keystores:debug",
50+
manifest = "src/main/AndroidManifest.xml",
51+
package_type = "debug",
52+
deps = [
53+
":app-code",
54+
],
55+
)

0 commit comments

Comments
 (0)