Skip to content

Commit 80bfea9

Browse files
authored
monorepo (#343)
1 parent bc29478 commit 80bfea9

File tree

288 files changed

+8445
-1370
lines changed

Some content is hidden

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

288 files changed

+8445
-1370
lines changed

.circleci/config.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,17 @@ aliases:
6464
- &tests-run
6565
name: "Run tests"
6666
command: |
67-
yarn build
68-
- &docs-build
67+
yarn test
68+
- &website-build
6969
name: "Build documentation"
7070
command: |
7171
eval $(opam config env)
72-
yarn docs:build
73-
- &docs-deploy-to-gh-pages
72+
cd ./website
73+
yarn build
74+
- &website-deploy-to-gh-pages
7475
name: Deploy documentation to GH Pages
7576
command: |
76-
cd ./docs/dist
77+
cd ./website/dist
7778
git init
7879
7980
git config credential.helper 'cache --timeout=120'
@@ -116,19 +117,19 @@ jobs:
116117
- run: *opam-setup
117118
- run: *opam-get-deps
118119
- save-cache: *opam-cache-save
119-
- run: *docs-build
120-
## Save docs for deployments
120+
- run: *website-build
121+
## Save website for deployments
121122
- persist_to_workspace:
122123
root: .
123124
paths:
124-
- docs
125+
- website
125126

126-
deploy-docs:
127+
website-deploy:
127128
<<: *defaults
128129
steps:
129130
- attach_workspace:
130131
at: ~/bs-react-native
131-
- run: *docs-deploy-to-gh-pages
132+
- run: *website-deploy-to-gh-pages
132133

133134
workflows:
134135
version: 2
@@ -137,7 +138,7 @@ workflows:
137138
- test:
138139
filters: *filter-ignore-gh-pages
139140

140-
- deploy-docs:
141+
- website-deploy:
141142
filters: *filter-only-master
142143
requires:
143144
- test

.gitignore

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
# macos crap
12
.DS_Store
3+
4+
# node
25
node_modules
3-
lib/bs
4-
lib/ocaml
5-
.merlin
6-
.vscode
6+
# npm unused lock file (we use yarn.lock)
77
package-lock.json
8-
npm-debug.log
9-
docs/dist
8+
9+
# ocaml/reason build artifacts
10+
**/lib/bs
11+
**/lib/ocaml
12+
**/.merlin

.npmignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.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
File renamed without changes.
File renamed without changes.

example/app.json renamed to bs-react-native-example/app.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
"slug": "bs-react-native",
66
"privacy": "public",
77
"sdkVersion": "30.0.0",
8-
"platforms": [
9-
"ios",
10-
"android"
11-
],
8+
"platforms": ["ios", "android"],
129
"version": "1.0.0",
1310
"orientation": "portrait",
1411
"icon": "./assets/icon.png",
@@ -20,9 +17,7 @@
2017
"updates": {
2118
"fallbackToCacheTimeout": 0
2219
},
23-
"assetBundlePatterns": [
24-
"**/*"
25-
],
20+
"assetBundlePatterns": ["**/*"],
2621
"ios": {
2722
"supportsTablet": true
2823
},
@@ -31,4 +26,4 @@
3126
},
3227
"githubUrl": "https://github.com/reasonml-community/bs-react-native"
3328
}
34-
}
29+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

example/package.json renamed to bs-react-native-example/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
{
22
"private": true,
3+
"version": "0.0.0",
34
"name": "bs-react-native-example",
45
"main": "node_modules/expo/AppEntry.js",
56
"scripts": {
7+
"re:clean": "bsb -clean-world",
68
"re:watch": "bsb -clean-world -make-world -w",
79
"re:build": "bsb -clean-world -make-world",
810
"start": "expo start",
911
"android": "expo start --android",
1012
"ios": "expo start --ios",
11-
"eject": "expo eject"
13+
"eject": "expo eject",
14+
"clean": "yarn re:clean",
15+
"test": "yarn re:build"
1216
},
1317
"dependencies": {
1418
"bs-platform": "^4.0.18",
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const path = require("path");
2+
3+
const config = {
4+
getProjectRoots() {
5+
return [path.resolve(__dirname, ".."), __dirname];
6+
},
7+
};
8+
9+
module.exports = config;
File renamed without changes.
File renamed without changes.
File renamed without changes.

bsconfig.json renamed to bs-react-native/bsconfig.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
"namespace": true,
44
"refmt": 3,
55
"reason": { "react-jsx": 2 },
6+
"package-specs": {
7+
"module": "es6",
8+
"in-source": true
9+
},
10+
"suffix": ".bs.js",
611
"sources": [
712
{
813
"dir": "src",

bs-react-native/package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "bs-react-native",
3+
"version": "0.10.0",
4+
"repository": "https://github.com/reasonml-community/bs-react-native.git",
5+
"license": "MIT",
6+
"keywords": [
7+
"reason",
8+
"reasonml",
9+
"bucklescript",
10+
"react-native"
11+
],
12+
"scripts": {
13+
"re:clean": "bsb -clean-world",
14+
"re:start": "bsb -make-world -w",
15+
"re:build": "bsb -make-world",
16+
"re:clean-build": "yarn re:clean && yarn re:build",
17+
"clean": "yarn re:clean",
18+
"test": "yarn re:clean-build"
19+
},
20+
"devDependencies": {
21+
"bs-platform": "^4.0.18",
22+
"reason-react": "^0.6.0"
23+
},
24+
"peerDependencies": {
25+
"react-native": "^0.53.3",
26+
"reason-react": "^0.6.0"
27+
}
28+
}

lib/js/src/Internals.js renamed to bs-react-native/src/Internals.bs.js

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

lib/js/src/RNEvent.js renamed to bs-react-native/src/RNEvent.bs.js

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.

lib/js/src/actionSheetIOS.js renamed to bs-react-native/src/actionSheetIOS.bs.js

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.

lib/js/src/alert.js renamed to bs-react-native/src/alert.bs.js

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.

lib/js/src/alertIOS.js renamed to bs-react-native/src/alertIOS.bs.js

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.

lib/js/src/animated.js renamed to bs-react-native/src/animated.bs.js

Lines changed: 26 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

0 commit comments

Comments
 (0)