Skip to content

Commit 60961da

Browse files
committed
Import template from reason-react-native repo
0 parents  commit 60961da

Some content is hidden

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

71 files changed

+8363
-0
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
end_of_line = lf
8+
insert_final_newline = true
9+
charset = utf-8
10+
indent_style = space
11+
indent_size = 2

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Tell github that .re and .rei files are Reason, sometimes recognized as C/C++
2+
*.re linguist-language=Reason
3+
*.rei linguist-language=Reason

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*.log
2+
3+
# macOS crap
4+
.DS_Store
5+
6+
# node
7+
node_modules
8+
9+
# npm unused lock file (we use yarn.lock)
10+
package-lock.json
11+
12+
# generated from template/.gitignore
13+
template/.npmignore

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.bs.js
2+
package.json

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# reason-react-native-template CHANGELOG
2+
3+
## 0.1.0 - 2019-06-17
4+
5+
✨ Initial release compatible with `[email protected]`

LICENSE

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

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Reason React Native HelloWorld
2+
3+
> This is a React Native application developed in Reason.
4+
5+
Please carefully read instructions below in order to enjoy ReasonML development
6+
experience.
7+
8+
## Setup
9+
10+
## Start a Reason React Native project with this template
11+
12+
```console
13+
npx react-native init MyApp --template reason-react-native-template
14+
cd MyApp
15+
```
16+
17+
⚠️ In case you got an error saying it's looking for
18+
`react-native-template-reason-react-native-template`, be sure to have
19+
uninstalled any previous react-native-cli version & rely on `npx`
20+
21+
```console
22+
npm -g uninstall react-native
23+
npm -g uninstall react-native-cli
24+
yarn global remove react-native
25+
yarn global remove react-native-cli
26+
```
27+
28+
Now that you are ready to go, you can check our documentation on
29+
[how to use Reason React Native](https://reasonml-community.github.io/reason-react-native/en/docs/usage/).

lerna.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"version": "0.0.0",
3+
"registry": "https://registry.npmjs.org/",
4+
"npmClient": "yarn",
5+
"useWorkspaces": true
6+
}

package.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"name": "reason-react-native-template",
3+
"version": "0.1.0-beta.3",
4+
"license": "MIT",
5+
"keywords": [
6+
"reason",
7+
"reasonml",
8+
"bucklescript",
9+
"react-native",
10+
"react-native-template"
11+
],
12+
"files": [
13+
"*",
14+
"!.DS_Store",
15+
"!template/**/*.bs.js",
16+
"!template/.merlin",
17+
"!template/android/app/build",
18+
"!template/ios/build",
19+
"!template/ios/Pods",
20+
"!template/lib/bs",
21+
"!template/lib/ocaml"
22+
],
23+
"devDependencies": {
24+
"bs-platform": "^5.0.4",
25+
"husky": "^1.3.1",
26+
"lerna": "^3.4.0",
27+
"lint-staged": "^8.1.5",
28+
"npm-run-all": "^3.0.0",
29+
"prettier": "^1.16.4"
30+
},
31+
"scripts": {
32+
"format:most": "prettier --write \"**/*.{md,json,js,css}\"",
33+
"format:re": "find . -name \"*.re\" -or -name \"*.rei\" | grep -v \"node_modules\" | xargs bsrefmt --in-place",
34+
"format": "yarn format:most && yarn format:re",
35+
"test": "cd template && yarn test",
36+
"#prepublishOnly": "this is to include debug.keystore for android. Using files here doesn't work as .gitignore of the other folder seems to be *stronger*",
37+
"prepublishOnly": "rm -f template/.npmignore && grep -w -v \"*.keystore\" template/.gitignore > template/.npmignore"
38+
},
39+
"prettier": {
40+
"trailingComma": "all",
41+
"proseWrap": "always"
42+
},
43+
"lint-staged": {
44+
"*.{md,json,js,css}": [
45+
"prettier --write"
46+
],
47+
"*.{re,rei}": [
48+
"bsrefmt --in-place",
49+
"git add"
50+
]
51+
},
52+
"husky": {
53+
"hooks": {
54+
"pre-commit": "lint-staged"
55+
}
56+
}
57+
}

script.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env node
2+
3+
console.log(
4+
"You are now ready to use Reason React Native. Be sure to check the docs at https://reasonml-community.github.io/reason-react-native/",
5+
);

0 commit comments

Comments
 (0)