Skip to content

Commit

Permalink
Make the example project compatible with Exponent and publish it
Browse files Browse the repository at this point in the history
  • Loading branch information
brentvatne committed Sep 14, 2016
1 parent 68b91bb commit 3d49749
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 14 deletions.
12 changes: 12 additions & 0 deletions Example/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
"react-native-stage-0/decorator-support"
],
"env": {
"development": {
"plugins": [
"transform-react-jsx-source"
]
}
}
}
1 change: 1 addition & 0 deletions Example/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OSX
#
.DS_Store
.exponent/*

# Xcode
#
Expand Down
23 changes: 23 additions & 0 deletions Example/exp.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
2 changes: 2 additions & 0 deletions Example/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -258,4 +259,5 @@ class SvgExample extends Component {
}
}

AppRegistry.registerComponent('main', () => SvgExample);
AppRegistry.registerComponent('SvgExample', () => SvgExample);
10 changes: 6 additions & 4 deletions Example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
## react-native-svg

[![Version](https://img.shields.io/npm/v/react-native-svg.svg)](https://www.npmjs.com/package/react-native-svg)
[![Build Status](https://travis-ci.org/magicismight/react-native-svg.svg?branch=master)](https://travis-ci.org/magicismight/react-native-svg)
[![NPM](https://img.shields.io/npm/dm/react-native-svg.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
Expand All @@ -44,7 +41,6 @@ Or use rnpm instead
rnpm link react-native-svg
```


#### Usage

There is an easy example
Expand Down

0 comments on commit 3d49749

Please sign in to comment.