Skip to content

Commit

Permalink
feat: Add support for RN 0.57 (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentriemer authored Sep 13, 2018
1 parent e9edcbb commit 313b00e
Show file tree
Hide file tree
Showing 205 changed files with 10,579 additions and 5,358 deletions.
16 changes: 15 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ packages/react-native-dom/flow-typed
[options]
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=packages/react-native-dom/node_modules
esproposal.decorators=ignore

module.system=haste
module.system.haste.use_name_reducers=true

# keep the following in sync with server/haste/hasteImpl.js
# get basename
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
# strip .js or .js.flow suffix
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
# strip .dom suffix
module.system.haste.name_reducers='^\(.*\)\.dom$' -> '\1'
module.system.haste.paths.whitelist=<PROJECT_ROOT>/packages/react-native-dom/Libraries/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/packages/react-native-dom/RNTester/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/packages/react-native-dom/ReactDom/.*

[version]
^0.75.0
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
.DS_Store

node_modules
lerna-debug.log
TestApp
TestApp

lib/core/metadata.js
lib/core/MetadataBlog.js

website/translated_docs
website/build/
website/yarn.lock
website/node_modules
website/i18n/*
30 changes: 30 additions & 0 deletions Examples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<html>

<head>
<title>React Native DOM Examples</title>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
</head>

<body>
<h1>React Native DOM Examples</h1>
<ul>
<li>
<a href="/packages/react-native-dom/RNTester/js">RNTester</a>
</li>
<li>
<a href="/packages/react-native-dom/Examples/LayoutAnimations">Layout Animation</a>
</li>
<li>
<a href="/packages/react-native-dom/Examples/FlatList/web">FlatList</a>
</li>
<li>
<a href="/packages/react-native-dom/Examples/AnimatedScrollView/web">Animated ScrollView</a>
</li>
<li>
<a href="/packages/react-native-dom/Examples/Button/web">Button</a>
</li>
<li>
<a href="/packages/react-native-dom/Examples/Tracking">Animated Tracking</a>
</li>
</ul>
</body>
93 changes: 93 additions & 0 deletions docs/doc1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
id: doc1
title: Latin-ish
sidebar_label: Example Page
---

Check the [documentation](https://docusaurus.io) for how to use Docusaurus.

## Lorem

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum
dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem
ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum massa eget
nulla aliquet sagittis. Proin odio tortor, vulputate ut odio in, ultrices
ultricies augue. Cras ornare ultrices lorem malesuada iaculis. Etiam sit amet
libero tempor, pulvinar mauris sed, sollicitudin sapien.

## Mauris In Code

```js
// Expression bodies
var odds = evens.map((v) => v + 1);
var nums = evens.map((v, i) => v + i);

// Statement bodies
nums.forEach((v) => {
if (v % 5 === 0) fives.push(v);
});

// Lexical this
var bob = {
_name: "Bob",
_friends: [],
printFriends() {
this._friends.forEach((f) => console.log(this._name + " knows " + f));
}
};

// Lexical arguments
function square() {
let example = () => {
let numbers = [];
for (let number of arguments) {
numbers.push(number * number);
}

return numbers;
};

return example();
}

square(2, 4, 7.5, 8, 11.5, 21); // returns: [4, 16, 56.25, 64, 132.25, 441]
```

## Nulla

Nulla facilisi. Maecenas sodales nec purus eget posuere. Sed sapien quam,
pretium a risus in, porttitor dapibus erat. Sed sit amet fringilla ipsum, eget
iaculis augue. Integer sollicitudin tortor quis ultricies aliquam. Suspendisse
fringilla nunc in tellus cursus, at placerat tellus scelerisque. Sed tempus elit
a sollicitudin rhoncus. Nulla facilisi. Morbi nec dolor dolor. Orci varius
natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras
et aliquet lectus. Pellentesque sit amet eros nisi. Quisque ac sapien in sapien
congue accumsan. Nullam in posuere ante. Vestibulum ante ipsum primis in
faucibus orci luctus et ultrices posuere cubilia Curae; Proin lacinia leo a nibh
fringilla pharetra.

## Orci

Orci varius natoque penatibus et magnis dis parturient montes, nascetur
ridiculus mus. Proin venenatis lectus dui, vel ultrices ante bibendum hendrerit.
Aenean egestas feugiat dui id hendrerit. Orci varius natoque penatibus et magnis
dis parturient montes, nascetur ridiculus mus. Curabitur in tellus laoreet,
eleifend nunc id, viverra leo. Proin vulputate non dolor vel vulputate.
Curabitur pretium lobortis felis, sit amet finibus lorem suscipit ut. Sed non
mollis risus. Duis sagittis, mi in euismod tincidunt, nunc mauris vestibulum
urna, at euismod est elit quis erat. Phasellus accumsan vitae neque eu placerat.
In elementum arcu nec tellus imperdiet, eget maximus nulla sodales. Curabitur eu
sapien eget nisl sodales fermentum.

## Phasellus

Phasellus pulvinar ex id commodo imperdiet. Praesent odio nibh, sollicitudin sit
amet faucibus id, placerat at metus. Donec vitae eros vitae tortor hendrerit
finibus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque
vitae purus dolor. Duis suscipit ac nulla et finibus. Phasellus ac sem sed dui
dictum gravida. Phasellus eleifend vestibulum facilisis. Integer pharetra nec
enim vitae mattis. Duis auctor, lectus quis condimentum bibendum, nunc dolor
aliquam massa, id bibendum orci velit quis magna. Ut volutpat nulla nunc, sed
interdum magna condimentum non. Sed urna metus, scelerisque vitae consectetur a,
feugiat quis magna. Donec dignissim ornare nisl, eget tempor risus malesuada
quis.
7 changes: 7 additions & 0 deletions docs/doc2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: doc2
title: document number 2
---

This is a link to [another document.](doc3.md)
This is a link to an [external page.](http://www.example.com)
37 changes: 37 additions & 0 deletions docs/doc3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
id: doc3
title: This is document number 3
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ac euismod odio, eu
consequat dui. Nullam molestie consectetur risus id imperdiet. Proin sodales
ornare turpis, non mollis massa ultricies id. Nam at nibh scelerisque, feugiat
ante non, dapibus tortor. Vivamus volutpat diam quis tellus elementum bibendum.
Praesent semper gravida velit quis aliquam. Etiam in cursus neque. Nam lectus
ligula, malesuada et mauris a, bibendum faucibus mi. Phasellus ut interdum
felis. Phasellus in odio pulvinar, porttitor urna eget, fringilla lectus.
Aliquam sollicitudin est eros. Mauris consectetur quam vitae mauris interdum
hendrerit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Duis et egestas libero, imperdiet faucibus ipsum. Sed posuere eget urna vel
feugiat. Vivamus a arcu sagittis, fermentum urna dapibus, congue lectus. Fusce
vulputate porttitor nisl, ac cursus elit volutpat vitae. Nullam vitae ipsum
egestas, convallis quam non, porta nibh. Morbi gravida erat nec neque bibendum,
eu pellentesque velit posuere. Fusce aliquam erat eu massa eleifend tristique.

Sed consequat sollicitudin ipsum eget tempus. Integer a aliquet velit. In justo
nibh, pellentesque non suscipit eget, gravida vel lacus. Donec odio ante,
malesuada in massa quis, pharetra tristique ligula. Donec eros est, tristique
eget finibus quis, semper non nisl. Vivamus et elit nec enim ornare placerat.
Sed posuere odio a elit cursus sagittis.

Phasellus feugiat purus eu tortor ultrices finibus. Ut libero nibh, lobortis et
libero nec, dapibus posuere eros. Sed sagittis euismod justo at consectetur.
Nulla finibus libero placerat, cursus sapien at, eleifend ligula. Vivamus elit
nisl, hendrerit ac nibh eu, ultrices tempus dui. Nam tellus neque, commodo non
rhoncus eu, gravida in risus. Nullam id iaculis tortor.

Nullam at odio in sem varius tempor sit amet vel lorem. Etiam eu hendrerit nisl.
Fusce nibh mauris, vulputate sit amet ex vitae, congue rhoncus nisl. Sed eget
tellus purus. Nullam tempus commodo erat ut tristique. Cras accumsan massa sit
amet justo consequat eleifend. Integer scelerisque vitae tellus id consectetur.
6 changes: 6 additions & 0 deletions docs/exampledoc4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: doc4
title: Other Document
---

this is another document
6 changes: 6 additions & 0 deletions docs/exampledoc5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: doc5
title: Fifth Document
---

Another one
51 changes: 36 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,33 @@
"bugs": {
"url": "https://github.com/vincentriemer/react-native-dom/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/vincentriemer/react-native-dom.git"
},
"license": "MIT",
"author": {
"name": "Vincent Riemer",
"email": "[email protected]",
"url": "https://vincentriemer.com"
},
"repository": {
"type": "git",
"url": "https://github.com/vincentriemer/react-native-dom.git"
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/react-native",
"**/react-native/**",
"**/@babel/runtime",
"**/@abel/runtime/**",
"**/pepjs",
"**/pepjs/**",
"**/webcomponentsjs",
"**/webcomponentsjs/**",
"**/web-animations-js",
"**/web-animations-js/**",
"**/react-native-dom/**"
]
},
"scripts": {
"clean": "shx rm -rf packages/*/lib",
Expand All @@ -42,29 +60,32 @@
"all-contributors-cli": "^4.11.1",
"babel-eslint": "^8.2.3",
"cz-conventional-changelog": "^2.1.0",
"eslint": "^4.19.1",
"eslint": "^5.0.1",
"eslint-import-resolver-lerna": "^1.0.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-prettier": "^2.6.0",
"flow-bin": "^0.73.0",
"flow-bin": "^0.75.0",
"husky": "^0.14.3",
"lerna": "^2.4.0",
"lint-staged": "^7.2.2",
"prettier": "^1.12.1",
"shelljs": "^0.8.2",
"shx": "^0.2.2",
"sort-package-json": "^1.13.0",
"wait-port": "^0.2.2"
},
"lint-staged": {
"package.json": ["sort-package-json", "git add"],
"*.js": ["eslint --fix", "git add"],
"*.{js,json,css,md}": ["prettier --write", "git add"]
},
"resolutions": {
"react": "^16.3.1"
},
"workspaces": {
"packages": ["packages/*"],
"nohoist": ["**/react-native", "**/react-native/**"]
"package.json": [
"sort-package-json",
"git add"
],
"*.js": [
"eslint --fix",
"git add"
],
"*.{js,json,css,md}": [
"prettier --write",
"git add"
]
}
}
21 changes: 6 additions & 15 deletions packages/react-native-dom/.babelrc
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
{
"sourceMaps": "inline",
"presets": ["flow", "react-native"],
"presets": ["@babel/flow", "module:metro-react-native-babel-preset"],
"plugins": [
"syntax-trailing-function-commas",
"transform-object-rest-spread",
"transform-decorators-legacy",
"transform-class-properties",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-proposal-object-rest-spread",
["@babel/plugin-proposal-nullish-coalescing-operator", { "loose": true }],
[
"transform-runtime",
"@babel/plugin-transform-runtime",
{
"helpers": true,
"polyfill": false,
"regenerator": true
}
],
"transform-inline-environment-variables",
"preval",
[
"babel-plugin-transform-builtin-classes",
{
"globals": ["HTMLElement"]
}
],
"./scripts/babel-plugin-haste-require"
],
"env": {
"lib": {
"presets": ["flow"]
"presets": ["@babel/flow"]
}
}
}
30 changes: 0 additions & 30 deletions packages/react-native-dom/Examples/index.html

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// @flow

// TODO: Replace with real implementation
module.exports = {
getString() {
return Promise.resolve("");
},
setString(content: string) {}
};
Loading

0 comments on commit 313b00e

Please sign in to comment.