Skip to content

Commit f810954

Browse files
committed
Reorganize monorepo structure
* Move all config files to './configs' * Simplify './scripts' folder.
1 parent d31a8a1 commit f810954

File tree

140 files changed

+110
-98
lines changed

Some content is hidden

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

140 files changed

+110
-98
lines changed

.codesandbox/ci.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"packages": ["packages/react-native-web", "packages/babel-plugin-react-native-web"],
33
"buildCommand": "compile",
4-
"sandboxes": ["/packages/examples/"],
4+
"sandboxes": ["/packages/react-native-web-examples/"],
55
"node": "16"
66
}

.prettierignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.watchmanconfig

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

README.md

Lines changed: 1 addition & 1 deletion

babel.config.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

.eslintignore renamed to configs/.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ dist
33
flow-typed
44
node_modules
55
packages/**/vendor/*
6-
packages/examples/.next
6+
packages/**/.next

.eslintrc renamed to configs/.eslintrc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"settings": {
33
"react": {
44
"pragma": "React",
5-
"version": "16.6",
5+
"version": "17.0",
66
"flowVersion": "0.148.0" // Flow version
77
}
88
},
@@ -33,6 +33,14 @@
3333
"jest": true,
3434
"node": true
3535
},
36+
"ignorePatterns": [
37+
"coverage",
38+
"dist",
39+
"flow-typed",
40+
"node_modules",
41+
"packages/**/vendor/*",
42+
"packages/**/.next"
43+
],
3644
"globals": {
3745

3846
},

.flowconfig renamed to configs/.flowconfig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
[ignore]
55
<PROJECT_ROOT>/.*/__tests__/.*
66
<PROJECT_ROOT>/packages/.*/dist/.*
7-
<PROJECT_ROOT>/packages/docs/.*
8-
<PROJECT_ROOT>/packages/examples/.*
7+
<PROJECT_ROOT>/packages/react-native-web-docs/.*
8+
<PROJECT_ROOT>/packages/react-native-web-examples/.*
99
.*/node_modules/.*/.*.json
10-
.*/node_modules/@emotion/css/*
11-
.*/node_modules/babel-plugin-transform-react-remove-prop-types/*
1210

1311
[include]
1412

configs/.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
../coverage
2+
../**/dist
3+
../flow-typed
4+
../node_modules
5+
../packages/**/vendor/*
6+
../packages/**/.next

configs/babel.config.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
module.exports = function (api) {
2+
if (api) {
3+
api.cache(true);
4+
}
5+
6+
let modules = false;
7+
8+
if (process.env.BABEL_ENV === 'commonjs' || process.env.NODE_ENV === 'test') {
9+
modules = 'commonjs';
10+
}
11+
12+
return {
13+
presets: [
14+
[
15+
'@babel/preset-env',
16+
{
17+
loose: true,
18+
modules,
19+
exclude: ['transform-typeof-symbol'],
20+
targets: {
21+
browsers: [
22+
'chrome 38',
23+
'android 4',
24+
'firefox 40',
25+
'ios_saf 7',
26+
'safari 7',
27+
'ie 10',
28+
'ie_mob 11',
29+
'edge 12',
30+
'opera 16',
31+
'op_mini 12',
32+
'and_uc 9',
33+
'and_chr 38'
34+
]
35+
}
36+
}
37+
],
38+
'@babel/preset-react',
39+
'@babel/preset-flow'
40+
],
41+
plugins: [
42+
'@babel/plugin-transform-flow-strip-types',
43+
['babel-plugin-transform-react-remove-prop-types', { mode: 'wrap' }],
44+
['@babel/plugin-proposal-class-properties', { loose: true }],
45+
['@babel/plugin-proposal-object-rest-spread', { useBuiltIns: true }],
46+
'@babel/plugin-proposal-nullish-coalescing-operator'
47+
].concat(modules ? ['babel-plugin-add-module-exports'] : [])
48+
};
49+
};

0 commit comments

Comments
 (0)