Skip to content

Commit 3a49f7a

Browse files
Project initialized - basic setup and CI configuration (#1)
* Create basic RNW app * Run CI configuration for ReactNativeNotes The CI configuration is based on CircleCI and Windows executor version 2.4.0 It contains only the Application build. Tests and deployment will be added once their implementation is completed. * Simplify the CI configuration Application build has been turned into the templated job, which is then called within the workflow.
1 parent 53dc947 commit 3a49f7a

Some content is hidden

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

50 files changed

+8476
-0
lines changed

.buckconfig

Lines changed: 6 additions & 0 deletions
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

.circleci/config.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
version: 2.1
2+
3+
orbs:
4+
windows: circleci/[email protected]
5+
6+
jobs:
7+
install:
8+
executor:
9+
name: windows/default
10+
shell: powershell.exe
11+
steps:
12+
- checkout
13+
- run:
14+
name: "Display environment information"
15+
command: npx envinfo
16+
- run:
17+
name: "Install library dependencies with Yarn"
18+
command: yarn install --frozen-lockfile
19+
- run:
20+
name: "Restore NuGet packages for Components"
21+
command: nuget restore .\windows\ReactNativeNotes.sln
22+
- run:
23+
name: "Restore .NET dependencies"
24+
command: msbuild -t:restore .\windows\ReactNativeNotes.sln
25+
- save_cache:
26+
key: v1-deps-{{ .Branch }}-{{ checksum "windows/ReactNativeNotes.sln" }}
27+
paths:
28+
- node_modules
29+
- windows/packages
30+
31+
# Application build
32+
build-Application-Configuration-Platform:
33+
parameters:
34+
configuration:
35+
type: enum
36+
enum: ["debug", "release"]
37+
platform:
38+
type: enum
39+
enum: ["ARM64", "x64", "ARM", "Win32"]
40+
executor: windows/default
41+
steps:
42+
- checkout
43+
- restore_cache:
44+
keys:
45+
- v1-deps-{{ .Branch }}-{{ checksum "windows/ReactNativeNotes.sln" }}
46+
- v1-deps-
47+
- run:
48+
name: "Build the application for Windows OS"
49+
command: npx react-native run-windows --arch << parameters.platform >> --no-deploy --no-launch --no-packager --no-autolink --logging -- << parameters.configuration >>
50+
51+
52+
workflows:
53+
version: 2.1
54+
build-x64:
55+
jobs:
56+
- install
57+
- build-Application-Configuration-Platform:
58+
name: build-Application-Release-x64
59+
configuration: "release"
60+
platform: "x64"
61+
requires:
62+
- install
63+
- build-Application-Configuration-Platform:
64+
name: build-Application-Debug-x64
65+
configuration: "debug"
66+
platform: "x64"
67+
requires:
68+
- install
69+
build-ARM64:
70+
jobs:
71+
- install
72+
- build-Application-Configuration-Platform:
73+
name: build-Application-Release-ARM64
74+
configuration: "release"
75+
platform: "ARM64"
76+
requires:
77+
- install
78+
- build-Application-Configuration-Platform:
79+
name: build-Application-Debug-ARM64
80+
configuration: "debug"
81+
platform: "ARM64"
82+
requires:
83+
- install

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};

.flowconfig

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]android.js
4+
5+
; Ignore "BUCK" generated dirs
6+
<PROJECT_ROOT>/\.buckd/
7+
8+
; Ignore polyfills
9+
node_modules/react-native/Libraries/polyfills/.*
10+
11+
; These should not be required directly
12+
; require from fbjs/lib instead: require('fbjs/lib/warning')
13+
node_modules/warning/.*
14+
15+
; Flow doesn't support platforms
16+
.*/Libraries/Utilities/LoadingView.js
17+
18+
[untyped]
19+
.*/node_modules/@react-native-community/cli/.*/.*
20+
21+
[include]
22+
23+
[libs]
24+
node_modules/react-native/interface.js
25+
node_modules/react-native/flow/
26+
27+
[options]
28+
emoji=true
29+
30+
esproposal.optional_chaining=enable
31+
esproposal.nullish_coalescing=enable
32+
33+
module.file_ext=.js
34+
module.file_ext=.json
35+
module.file_ext=.ios.js
36+
37+
munge_underscores=true
38+
39+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
40+
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
41+
42+
suppress_type=$FlowIssue
43+
suppress_type=$FlowFixMe
44+
suppress_type=$FlowFixMeProps
45+
suppress_type=$FlowFixMeState
46+
47+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
48+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
49+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
50+
51+
[lints]
52+
sketchy-null-number=warn
53+
sketchy-null-mixed=warn
54+
sketchy-number=warn
55+
untyped-type-import=warn
56+
nonstrict-import=warn
57+
deprecated-type=warn
58+
unsafe-getters-setters=warn
59+
unnecessary-invariant=warn
60+
signature-verification-failure=warn
61+
deprecated-utility=error
62+
63+
[strict]
64+
deprecated-type
65+
nonstrict-import
66+
sketchy-null
67+
unclear-type
68+
unsafe-getters-setters
69+
untyped-import
70+
untyped-type-import
71+
72+
[version]
73+
^0.122.0

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

.gitignore

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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+
24+
# Android/IntelliJ
25+
#
26+
build/
27+
.idea
28+
.gradle
29+
local.properties
30+
*.iml
31+
32+
# node.js
33+
#
34+
node_modules/
35+
npm-debug.log
36+
yarn-error.log
37+
38+
# BUCK
39+
buck-out/
40+
\.buckd/
41+
*.keystore
42+
!debug.keystore
43+
44+
# fastlane
45+
#
46+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47+
# screenshots whenever they are needed.
48+
# For more information about the recommended setup visit:
49+
# https://docs.fastlane.tools/best-practices/source-control/
50+
51+
*/fastlane/report.xml
52+
*/fastlane/Preview.html
53+
*/fastlane/screenshots
54+
55+
# Bundle artifact
56+
*.jsbundle
57+
58+
# CocoaPods
59+
/ios/Pods/

.prettierrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
bracketSpacing: false,
3+
jsxBracketSameLine: true,
4+
singleQuote: true,
5+
trailingComma: 'all',
6+
};

.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

App.js

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*
5+
* @format
6+
* @flow strict-local
7+
*/
8+
9+
import React from 'react';
10+
import {
11+
StyleSheet,
12+
ScrollView,
13+
View,
14+
Text,
15+
} from 'react-native';
16+
17+
import {
18+
Header,
19+
LearnMoreLinks,
20+
Colors,
21+
} from 'react-native/Libraries/NewAppScreen';
22+
23+
24+
class App extends React.Component {
25+
26+
render() {
27+
return (
28+
<ScrollView style={styles.scrollView}>
29+
<Header/>
30+
<View style={styles.body}>
31+
<View>
32+
<Text style={styles.sectionTitle}>Learn More</Text>
33+
<Text style={styles.sectionDescription}>
34+
Read the docs to discover what to do next:
35+
</Text>
36+
</View>
37+
<LearnMoreLinks />
38+
</View>
39+
</ScrollView>
40+
);
41+
}
42+
};
43+
44+
const styles = StyleSheet.create({
45+
scrollView: {
46+
backgroundColor: Colors.lighter,
47+
},
48+
body: {
49+
backgroundColor: Colors.lighter,
50+
},
51+
sectionTitle: {
52+
fontSize: 24,
53+
paddingHorizontal: 24,
54+
fontWeight: '600',
55+
color: Colors.black,
56+
},
57+
sectionDescription: {
58+
marginTop: 8,
59+
fontSize: 18,
60+
paddingHorizontal: 24,
61+
fontWeight: '400',
62+
color: Colors.dark,
63+
}
64+
});
65+
66+
export default App;

Deploy.binlog

543 KB
Binary file not shown.

0 commit comments

Comments
 (0)