Skip to content

Commit 902ea24

Browse files
author
vemarav
committed
react-native-web-template
0 parents  commit 902ea24

Some content is hidden

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

67 files changed

+15511
-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

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

.gitignore

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# web
2+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
3+
4+
# dependencies
5+
/node_modules
6+
/.pnp
7+
.pnp.js
8+
9+
# testing
10+
/coverage
11+
12+
# production
13+
/build
14+
/dist
15+
16+
# misc
17+
.DS_Store
18+
.env.local
19+
.env.development.local
20+
.env.test.local
21+
.env.production.local
22+
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
28+
# OSX
29+
#
30+
.DS_Store
31+
32+
# Xcode
33+
#
34+
build/
35+
*.pbxuser
36+
!default.pbxuser
37+
*.mode1v3
38+
!default.mode1v3
39+
*.mode2v3
40+
!default.mode2v3
41+
*.perspectivev3
42+
!default.perspectivev3
43+
xcuserdata
44+
*.xccheckout
45+
*.moved-aside
46+
DerivedData
47+
*.hmap
48+
*.ipa
49+
*.xcuserstate
50+
51+
# Android/IntelliJ
52+
#
53+
build/
54+
.idea
55+
.gradle
56+
local.properties
57+
*.iml
58+
59+
# node.js
60+
#
61+
node_modules/
62+
npm-debug.log
63+
yarn-error.log
64+
65+
# BUCK
66+
buck-out/
67+
\.buckd/
68+
*.keystore
69+
!debug.keystore
70+
71+
# fastlane
72+
#
73+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
74+
# screenshots whenever they are needed.
75+
# For more information about the recommended setup visit:
76+
# https://docs.fastlane.tools/best-practices/source-control/
77+
78+
*/fastlane/report.xml
79+
*/fastlane/Preview.html
80+
*/fastlane/screenshots
81+
82+
# Bundle artifact
83+
*.jsbundle
84+
85+
# CocoaPods
86+
/ios/Pods/

.prettierrc.js

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

.watchmanconfig

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

LICENSE

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
MIT License
2+
3+
Copyright (c) 2018 - present Aravind Vemula
4+
5+
All rights reserved.
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.

README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# react-native-web-typescript-template
2+
3+
The template consist React Native and React Web with Typescript and Webpack.
4+
5+
Usage
6+
---
7+
8+
To rename app run
9+
```
10+
yarn rename app_name
11+
```
12+
13+
To clean app run
14+
```
15+
yarn clean
16+
```
17+
18+
Run it on browser
19+
```
20+
yarn web
21+
```
22+
23+
Run it on android
24+
```
25+
yarn android
26+
```
27+
28+
Run it on ios
29+
```
30+
yarn ios
31+
```
32+
33+
To start metro bundler run
34+
```
35+
yarn start
36+
```

__tests__/App-test.js

+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+
});

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.template",
39+
)
40+
41+
android_resource(
42+
name = "res",
43+
package = "com.template",
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)