Skip to content

Commit 14c395f

Browse files
committed
wip: improve dev workflow
1 parent 8f75241 commit 14c395f

File tree

11 files changed

+121
-85
lines changed

11 files changed

+121
-85
lines changed

.flowconfig

Lines changed: 33 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,40 @@
11
[ignore]
2-
3-
# We fork some components by platform.
2+
; We fork some components by platform
43
.*/*[.]android.js
54

6-
# Ignore templates with `@flow` in header
7-
.*/local-cli/generator.*
8-
9-
# Ignore malformed json
10-
.*/node_modules/y18n/test/.*\.json
5+
; Ignore templates for 'react-native init'
6+
.*/local-cli/templates/.*
117

12-
# Ignore the website subdir
8+
; Ignore the website subdir
139
<PROJECT_ROOT>/website/.*
1410

15-
# Ignore BUCK generated dirs
11+
; Ignore "BUCK" generated dirs
1612
<PROJECT_ROOT>/\.buckd/
1713

18-
# Ignore unexpected extra @providesModule
19-
.*/node_modules/commoner/test/source/widget/share.js
14+
; Ignore unexpected extra "@providesModule"
15+
.*/node_modules/.*/node_modules/fbjs/.*
16+
+.*/node_modules/react-dom/.*
2017

21-
# Ignore duplicate module providers
22-
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
18+
; Ignore duplicate module providers
19+
; For RN Apps installed via npm, "Libraries" folder is inside
20+
; "node_modules/react-native" but in the source repo it is in the root
2321
.*/Libraries/react-native/React.js
2422
.*/Libraries/react-native/ReactNative.js
25-
.*/node_modules/jest-runtime/build/__tests__/.*
2623

27-
.*/node_modules/glamor/es6/CSSPropertyOperations/
28-
29-
.*/example/node_modules/fbjs/
30-
.*/example/node_modules/react/
31-
.*/example/node_modules/react-static-container/
32-
.*/example/node_modules/react-native/
33-
.*/example/node_modules/exponent/
34-
.*/example/node_modules/@exponent/
35-
.*/example/node_modules/fbemitter/
24+
; Ignore duplicate modules under example/
25+
.*/example/node_modules/fbjs
26+
.*/example/node_modules/fbemitter
27+
.*/example/node_modules/react
28+
.*/example/node_modules/react-native
29+
.*/example/node_modules/expo
30+
.*/example/node_modules/@expo/ex-navigation
3631
.*/example/\.buckd/
3732

38-
.*/docs/node_modules/fbjs/
39-
.*/docs/node_modules/react/
40-
.*/docs/node_modules/fbemitter/
33+
[include]
34+
35+
[libs]
36+
node_modules/react-native/Libraries/react-native/react-native-interface.js
37+
node_modules/react-native/flow
4138

4239
[include]
4340

@@ -46,32 +43,28 @@ node_modules/react-native/Libraries/react-native/react-native-interface.js
4643
node_modules/react-native/flow
4744

4845
[options]
49-
module.system=haste
46+
emoji=true
5047

51-
esproposal.decorators=ignore
52-
esproposal.class_static_fields=enable
53-
esproposal.class_instance_fields=enable
54-
esproposal.export_star_as=enable
55-
56-
unsafe.enable_getters_and_setters=true
48+
module.system=haste
5749

5850
experimental.strict_type_args=true
5951

6052
munge_underscores=true
6153

62-
module.name_mapper='^exponent$' -> 'emptyObject'
63-
module.name_mapper='^@exponent/ex-navigation$' -> 'emptyObject'
64-
module.name_mapper='^react-native-vector-icons/MaterialIcons$' -> 'emptyObject'
65-
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
54+
module.name_mapper='^expo$' -> 'emptyObject'
55+
module.name_mapper='^@expo/ex-navigation$' -> 'emptyObject'
6656
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\)$' -> 'RelativeImageStub'
6757

6858
suppress_type=$FlowIssue
6959
suppress_type=$FlowFixMe
7060
suppress_type=$FixMe
7161

72-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-2]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
73-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-2]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
62+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
63+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
7464
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
65+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
66+
67+
unsafe.enable_getters_and_setters=true
7568

7669
[version]
77-
^0.33.0
70+
^0.42.0

example/.babelrc

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
{
2-
"presets": ["react-native-stage-0/decorator-support"],
3-
"env": {
4-
"development": {
5-
"plugins": ["transform-react-jsx-source"]
6-
}
7-
}
2+
"presets": [
3+
"expo"
4+
],
5+
"plugins": [
6+
["module-resolver", {
7+
"alias": {
8+
"react-native-paper": "..",
9+
"react-native-vector-icons": "@expo-vector-icons",
10+
"@expo-vector-icons/lib/create-icon-set": "react-native-vector-icons/lib/create-icon-set",
11+
"@expo-vector-icons/lib/icon-button": "react-native-vector-icons/lib/icon-button",
12+
"@expo-vector-icons/lib/create-icon-set-from-fontello": "react-native-vector-icons/lib/create-icon-set-from-fontello",
13+
"@expo-vector-icons/lib/create-icon-set-from-icomoon": "react-native-vector-icons/lib/create-icon-set-from-icomoon",
14+
"@expo-vector-icons/glyphmaps": "react-native-vector-icons/glyphmaps"
15+
}
16+
}]
17+
]
818
}

example/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules/**/*
2-
.exponent/*
2+
.expo/*
33
npm-debug.*

example/exp.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22
"name": "React Native Paper Example",
33
"description": "Example for React Native Paper",
44
"slug": "react-native-paper-example",
5-
"sdkVersion": "11.0.0",
5+
"sdkVersion": "16.0.0",
66
"version": "1.0.0",
77
"orientation": "default",
88
"primaryColor": "#cccccc",
9-
"iconUrl": "https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png",
109
"notification": {
11-
"iconUrl": "https://s3.amazonaws.com/exp-us-standard/placeholder-push-icon-blue-circle.png",
10+
"icon": "https://s3.amazonaws.com/exp-us-standard/placeholder-push-icon-blue-circle.png",
1211
"color": "#000000"
1312
},
14-
"loading": {
15-
"iconUrl": "https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png",
16-
"hideExponentText": false
17-
},
1813
"packagerOpts": {
19-
"assetExts": ["ttf", "mp4"]
14+
"assetExts": [
15+
"ttf"
16+
],
17+
"config": "./rn-cli.config.js",
18+
"projectRoots": ""
2019
}
2120
}

example/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* @flow */
22

3-
import Exponent from 'exponent';
3+
import Expo from 'expo';
44
import React, { Component } from 'react';
55
import {
66
View,
@@ -10,7 +10,7 @@ import {
1010
import {
1111
NavigationProvider,
1212
StackNavigation,
13-
} from '@exponent/ex-navigation';
13+
} from '@expo/ex-navigation';
1414
import {
1515
Colors,
1616
Drawer,
@@ -89,4 +89,4 @@ const styles = StyleSheet.create({
8989
},
9090
});
9191

92-
Exponent.registerRootComponent(App);
92+
Expo.registerRootComponent(App);

example/package.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@
66
"private": true,
77
"main": "main.js",
88
"dependencies": {
9-
"@exponent/ex-navigation": "^2.0.0",
10-
"@exponent/vector-icons": "^2.0.3",
11-
"exponent": "^11.0.2",
12-
"react": "~15.3.2",
13-
"react-native": "github:exponentjs/react-native#sdk-11.0.3",
14-
"react-native-paper": "file:../",
15-
"react-native-vector-icons": "git+https://github.com/exponentjs/react-native-vector-icons.git"
9+
"@expo/ex-navigation": "^2.0.0",
10+
"@expo/vector-icons": "^4.0.0",
11+
"color": "^0.11.4",
12+
"escape-string-regexp": "^1.0.5",
13+
"expo": "~16.0.0",
14+
"react": "16.0.0-alpha.6",
15+
"react-native": "git+https://github.com/expo/react-native.git#sdk-16.0.0",
16+
"react-native-drawer": "^2.3.0"
17+
},
18+
"devDependencies": {
19+
"babel-plugin-module-resolver": "^2.7.0",
20+
"babel-preset-expo": "^1.0.0"
1621
}
1722
}

example/rn-cli.config.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* eslint-disable import/no-commonjs */
2+
3+
const path = require('path');
4+
const escape = require('escape-string-regexp');
5+
const blacklist = require('react-native/packager/blacklist');
6+
7+
module.exports = {
8+
getProjectRoots() {
9+
return [__dirname, path.resolve(__dirname, '..')];
10+
},
11+
getProvidesModuleNodeModules() {
12+
return ['react-native', 'react', 'prop-types', 'react-native-drawer', 'color'];
13+
},
14+
getBlacklistRE() {
15+
return blacklist([
16+
new RegExp(
17+
`^${escape(path.resolve(__dirname, '..', 'node_modules'))}\\/.*$` // eslint-disable-line prettier/prettier
18+
),
19+
new RegExp(
20+
`^${escape(path.resolve(__dirname, '..', 'docs', 'node_modules'))}\\/.*$` // eslint-disable-line prettier/prettier
21+
),
22+
]);
23+
},
24+
};

example/src/Router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import React from 'react';
44
import {
55
createRouter,
6-
} from '@exponent/ex-navigation';
6+
} from '@expo/ex-navigation';
77
import ExampleList, { examples } from './ExampleList';
88

99
const routes = Object.keys(examples)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "@expo-vector-icons",
3+
"version": "1.0.0",
4+
"main": "../../node_modules/@expo/vector-icons/index.js",
5+
"license": "MIT"
6+
}

package.json

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,43 @@
33
"version": "0.0.1",
44
"description": "",
55
"main": "src/index.js",
6-
"scripts": {
7-
"flow": "flow",
8-
"lint": "eslint .",
9-
"test": "echo \"Error: no test specified\" && exit 1"
10-
},
116
"files": [
127
"src/"
138
],
149
"repository": {
1510
"type": "git",
16-
"url": "git+https://github.com/ahmedlhanafy/react-native-paper.git"
11+
"url": "git+https://github.com/callstackio/react-native-paper.git"
1712
},
1813
"author": "",
1914
"license": "MIT",
2015
"bugs": {
21-
"url": "https://github.com/ahmedlhanafy/react-native-paper/issues"
16+
"url": "https://github.com/callstackio/react-native-paper/issues"
2217
},
23-
"homepage": "https://github.com/ahmedlhanafy/react-native-paper#readme",
18+
"homepage": "https://github.com/callstackio/react-native-paper#readme",
2419
"peerDependencies": {
2520
"react": "*",
2621
"react-native": "*",
2722
"react-native-vector-icons": "*"
2823
},
2924
"devDependencies": {
30-
"babel-eslint": "^7.1.0",
31-
"eslint": "^3.9.1",
32-
"eslint-plugin-babel": "^3.3.0",
25+
"babel-eslint": "^7.2.3",
26+
"eslint": "^3.19.0",
27+
"eslint-plugin-babel": "^4.1.1",
3328
"eslint-plugin-import": "^2.2.0",
34-
"eslint-plugin-react": "^6.6.0",
35-
"eslint-plugin-react-native": "^2.0.0",
36-
"flow-bin": "^0.33.0",
37-
"react": "~15.3.2",
38-
"react-native": "~0.37.0",
39-
"react-native-vector-icons": "~3.0.0"
29+
"eslint-plugin-react": "^7.0.0",
30+
"eslint-plugin-react-native": "^2.3.2",
31+
"flow-bin": "~0.42.0",
32+
"react": "16.0.0-alpha.6",
33+
"react-native": "~0.44.0",
34+
"react-native-vector-icons": "~4.1.1"
4035
},
4136
"dependencies": {
4237
"color": "^0.11.4",
43-
"highlight.js": "^9.8.0",
4438
"react-native-drawer": "^2.3.0"
39+
},
40+
"scripts": {
41+
"flow": "flow",
42+
"lint": "eslint .",
43+
"test": "echo \"Error: no test specified\" && exit 1"
4544
}
4645
}

0 commit comments

Comments
 (0)