mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-26 12:29:10 +00:00
Make the example project compatible with Exponent and publish it
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"presets": [
|
||||
"react-native-stage-0/decorator-support"
|
||||
],
|
||||
"env": {
|
||||
"development": {
|
||||
"plugins": [
|
||||
"transform-react-jsx-source"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
# OSX
|
||||
#
|
||||
.DS_Store
|
||||
.exponent/*
|
||||
|
||||
# Xcode
|
||||
#
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "React Native SVG Examples",
|
||||
"description": "react-native-svg is built to provide a SVG interface to react native on both iOS and Android. https://github.com/react-native-community/react-native-svg",
|
||||
"slug": "react-native-svg-examples",
|
||||
"sdkVersion": "10.0.0",
|
||||
"version": "1.0.0",
|
||||
"orientation": "portrait",
|
||||
"primaryColor": "#cccccc",
|
||||
"iconUrl": "https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png",
|
||||
"notification": {
|
||||
"iconUrl": "https://s3.amazonaws.com/exp-us-standard/placeholder-push-icon-blue-circle.png",
|
||||
"color": "#000000"
|
||||
},
|
||||
"loading": {
|
||||
"iconUrl": "https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png",
|
||||
"hideExponentText": false
|
||||
},
|
||||
"packagerOpts": {
|
||||
"assetExts": [
|
||||
"ttf"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
* https://github.com/magicismight/react-native-svg/tree/master/Example
|
||||
*/
|
||||
'use strict';
|
||||
import Exponent from 'exponent';
|
||||
import React, {Component} from 'react';
|
||||
import {Dimensions} from 'react-native';
|
||||
|
||||
@@ -258,4 +259,5 @@ class SvgExample extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
AppRegistry.registerComponent('main', () => SvgExample);
|
||||
AppRegistry.registerComponent('SvgExample', () => SvgExample);
|
||||
|
||||
@@ -6,9 +6,11 @@
|
||||
"start": "react-native start"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^15.1.0",
|
||||
"react-native": "^0.33.0",
|
||||
"react": "15.3.1",
|
||||
"react-native": "github:exponentjs/react-native#sdk-10.0.0",
|
||||
"react-native-root-modal": "^1.0.4",
|
||||
"react-native-svg": "../"
|
||||
}
|
||||
"@exponent/vector-icons": "^1.0.1",
|
||||
"exponent": "^10.0.0"
|
||||
},
|
||||
"main": "main.js"
|
||||
}
|
||||
|
||||
@@ -1,25 +1,22 @@
|
||||
## react-native-svg
|
||||
|
||||
[](https://www.npmjs.com/package/react-native-svg)
|
||||
[](https://travis-ci.org/magicismight/react-native-svg)
|
||||
[](https://www.npmjs.com/package/react-native-svg)
|
||||
|
||||
`react-native-svg` is built to provide a SVG interface to react native on both iOS and Android
|
||||
|
||||
# IMPORTANT:
|
||||
|
||||
`react-native-svg` **NO LONGER rely on ReactNativeART**, it has its own native code dependency now (which is based on ReactNativeART code but support more SVG features)
|
||||
`react-native-svg` is built to provide a SVG interface to react native on both iOS and Android.
|
||||
|
||||
[Check out the demo](https://getexponent.com/@rncommunity/react-native-svg-examples).
|
||||
|
||||
### Features
|
||||
|
||||
1. Supports most of SVG elements and properties(Rect, Circle, Line, Polyline, Polygon, G ...).
|
||||
2. Easy to convert SVG code into ReactNative code.
|
||||
1. Supports most of SVG elements and properties (Rect, Circle, Line, Polyline, Polygon, G ...).
|
||||
2. Easy to convert SVG code into React Native code.
|
||||
|
||||
|
||||
#### Install
|
||||
|
||||
### note:
|
||||
*With Exponent, this is pre-installed. Jump ahead to [Usage](#Usage)*
|
||||
|
||||
react-native-svg >= 3.2.0 only supports react-native >= 0.29.0
|
||||
react-native-svg >= 4.2.0 only supports react-native >= 0.32.0
|
||||
react-native-svg >= 4.3.0 only supports react-native >= 0.33.0
|
||||
@@ -44,7 +41,6 @@ Or use rnpm instead
|
||||
rnpm link react-native-svg
|
||||
```
|
||||
|
||||
|
||||
#### Usage
|
||||
|
||||
There is an easy example
|
||||
|
||||
Reference in New Issue
Block a user