From 321051b72366666ba6e28985cff017cb6d3c506d Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Mon, 18 Dec 2017 17:16:09 +0000 Subject: [PATCH] [add] ART export Improve API compatibility with React Native by exporting 'react-art' as 'ART'. Fix #602 --- babel/index.js | 1 + package.json | 1 + src/components/ART/index.js | 2 ++ src/module.js | 3 +++ yarn.lock | 15 +++++++++++++++ 5 files changed, 22 insertions(+) create mode 100644 src/components/ART/index.js diff --git a/babel/index.js b/babel/index.js index 2f16ed08..0bb41c38 100644 --- a/babel/index.js +++ b/babel/index.js @@ -27,6 +27,7 @@ const getDistLocation = importName => { // components case 'ActivityIndicator': + case 'ART': case 'Button': case 'FlatList': case 'Image': diff --git a/package.json b/package.json index 060dd698..b68b9342 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "inline-style-prefixer": "^3.0.8", "normalize-css-color": "^1.0.2", "prop-types": "^15.6.0", + "react-art": "^16.2.0", "react-timer-mixin": "^0.13.3" }, "devDependencies": { diff --git a/src/components/ART/index.js b/src/components/ART/index.js new file mode 100644 index 00000000..eb8e3349 --- /dev/null +++ b/src/components/ART/index.js @@ -0,0 +1,2 @@ +import ART from 'react-art'; +export default ART; diff --git a/src/module.js b/src/module.js index 4bb479bb..5b927a66 100644 --- a/src/module.js +++ b/src/module.js @@ -28,6 +28,7 @@ import Vibration from './apis/Vibration'; // components import ActivityIndicator from './components/ActivityIndicator'; +import ART from './components/ART'; import Button from './components/Button'; import FlatList from './components/FlatList'; import Image from './components/Image'; @@ -92,6 +93,7 @@ export { Vibration, // components ActivityIndicator, + ART, Button, FlatList, Image, @@ -159,6 +161,7 @@ const ReactNative = { // components ActivityIndicator, + ART, Button, FlatList, Image, diff --git a/yarn.lock b/yarn.lock index 2cccac54..ce290f63 100644 --- a/yarn.lock +++ b/yarn.lock @@ -290,6 +290,10 @@ arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" +art@^0.10.1: + version "0.10.1" + resolved "https://registry.yarnpkg.com/art/-/art-0.10.1.tgz#38541883e399225c5e193ff246e8f157cf7b2146" + asap@~2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.5.tgz#522765b50c3510490e52d7dcfe085ef9ba96958f" @@ -4471,6 +4475,17 @@ rc@^1.1.7: minimist "^1.2.0" strip-json-comments "~2.0.1" +react-art@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/react-art/-/react-art-16.2.0.tgz#3b6914a6c9da64f83910896fa8cdae6ddf2aa589" + dependencies: + art "^0.10.1" + create-react-class "^15.6.2" + fbjs "^0.8.16" + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.0" + react-deep-force-update@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.0.1.tgz#f911b5be1d2a6fe387507dd6e9a767aa2924b4c7"