Skip to content

Commit a893aa9

Browse files
committed
prepare for publish
1 parent 7baeb15 commit a893aa9

16 files changed

+15
-191
lines changed

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
11
# React Native Draft.js Render
22

3-
[![Build Status](https://travis-ci.org/globocom/react-native-draftjs-render.svg?branch=master)](https://travis-ci.org/globocom/react-native-draftjs-render)
4-
[![Coverage Status](https://coveralls.io/repos/github/globocom/react-native-draftjs-render/badge.svg)](https://coveralls.io/github/globocom/react-native-draftjs-render)
5-
[![npm version](https://badge.fury.io/js/react-native-draftjs-render.svg)](https://www.npmjs.com/package/react-native-draftjs-render)
6-
7-
A React Native render for [Draft.js](http://draftjs.org/) model.
8-
9-
## Discussion and Support
10-
11-
Join the [#react-native-render](https://draftjs.slack.com/messages/react_native_render) channel on DraftJS Slack team.
3+
A React Native render for [Draft.js](http://draftjs.org/) model and works great with [react-draft-wysiwyg](https://github.com/jpuri/react-draft-wysiwyg).
124

135
## Getting Started
146
Install **React Native Draft.js Render** on your React Native project, using NPM or Yarn:
157

168
```sh
17-
npm i -S react-native-draftjs-render
9+
npm i -S react-native-draftjs-renderer
1810
# or...
19-
yarn add react-native-draftjs-render
11+
yarn add react-native-draftjs-renderer
2012
```
2113

2214
### Using
@@ -28,7 +20,7 @@ import {
2820
AppRegistry,
2921
} from 'react-native';
3022

31-
import RNDraftJSRender from 'react-native-draftjs-render';
23+
import RNDraftJSRender from 'react-native-draftjs-renderer';
3224
import contentState from 'DraftJs/contentState';
3325

3426
const MyApp = () => (
@@ -39,75 +31,3 @@ const MyApp = () => (
3931

4032
AppRegistry.registerComponent('MyApp', () => MyApp);
4133
```
42-
43-
See our [`sample`](https://github.com/globocom/react-native-draftjs-render/tree/master/sample) folder for more details.
44-
45-
### Adding custom styles
46-
RNDraftJSRender comes with default styles, but you can use your own:
47-
48-
```js
49-
import React from 'react';
50-
import {
51-
AppRegistry,
52-
StyleSheet,
53-
} from 'react-native';
54-
55-
import RNDraftJSRender from 'react-native-draftjs-render';
56-
import contentState from 'DraftJs/contentState';
57-
58-
const styles = StyleSheet.flatten({
59-
paragraph: {
60-
color: 'pink',
61-
fontSize: 18,
62-
},
63-
link: {
64-
color: 'blue',
65-
fontWeight: 'bold',
66-
},
67-
});
68-
69-
const MyApp = () => (
70-
<RNDraftJSRender
71-
contentState={contentState}
72-
customStyles={styles}
73-
/>
74-
);
75-
76-
AppRegistry.registerComponent('MyApp', () => MyApp);
77-
```
78-
79-
See more at **[Custom Styles](https://github.com/globocom/react-native-draftjs-render/blob/master/docs/CustomStyles.md)** documentation.
80-
81-
## Developing
82-
83-
To develop using example react-native project:
84-
85-
```
86-
git clone [email protected]:globocom/react-native-draftjs-render.git
87-
cd react-native-draftjs-render/
88-
make setup
89-
```
90-
91-
To run tests:
92-
93-
```
94-
make test
95-
```
96-
97-
To watch lib changes appearing on Sample App:
98-
99-
```
100-
make watch
101-
```
102-
103-
To run sample app in iOS:
104-
105-
```
106-
make ios
107-
```
108-
109-
To run sample app in Android:
110-
111-
```
112-
make android
113-
```

index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Globo.com (https://github.com/globocom)
3-
*
4-
* License: MIT
5-
*/
6-
71
// @flow
82

93
import React, {

package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "react-native-draftjs-render",
3-
"description": "React Native render for draft.js model",
4-
"version": "1.0.3",
2+
"name": "react-native-draftjs-renderer",
3+
"description": "React Native render for draft.js and react-draft-wysiwyg",
4+
"version": "1.0.0",
55
"scripts": {
66
"test": "npm run linter && npm run flow && npm run coverage",
77
"test-coveralls": "npm test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
@@ -14,9 +14,12 @@
1414
"main": "index.js",
1515
"keywords": [
1616
"react-native",
17-
"draft-js"
17+
"draft-js",
18+
"react-draft-wysiwyg",
19+
"html",
20+
"draftjs"
1821
],
19-
"author": "globo.com",
22+
"author": "aihehuo.com",
2023
"license": "MIT",
2124
"peerDependencies": {
2225
"react": "^15.4.2",
@@ -63,10 +66,10 @@
6366
},
6467
"repository": {
6568
"type": "git",
66-
"url": "git+https://github.com/globocom/react-native-draftjs-render.git"
69+
"url": "git+https://github.com/aihehuo/react-native-draftjs-renderer.git"
6770
},
6871
"bugs": {
69-
"url": "https://github.com/globocom/react-native-draftjs-render/issues"
72+
"url": "https://github.com/aihehuo/react-native-draftjs-renderer/issues"
7073
},
71-
"homepage": "https://github.com/globocom/react-native-draftjs-render#readme"
74+
"homepage": "https://github.com/aihehuo/react-native-draftjs-renderer#readme"
7275
}

src/components/AtomicView.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Globo.com (https://github.com/globocom)
3-
*
4-
* License: MIT
5-
*/
6-
71
// @flow
82

93
import React from 'react';

src/components/BlockQuote.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Globo.com (https://github.com/globocom)
3-
*
4-
* License: MIT
5-
*/
6-
71
// @flow
82

93
import React from 'react';

src/components/DraftJsText.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Globo.com (https://github.com/globocom)
3-
*
4-
* License: MIT
5-
*/
6-
71
// @flow
82

93
import React from 'react';

src/components/OrderedListItem.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Globo.com (https://github.com/globocom)
3-
*
4-
* License: MIT
5-
*/
6-
71
// @flow
82

93
import React from 'react';

src/components/TextStyled.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Globo.com (https://github.com/globocom)
3-
*
4-
* License: MIT
5-
*/
6-
71
// @flow
82

93
import React from 'react';

src/components/UnorderedListItem.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Globo.com (https://github.com/globocom)
3-
*
4-
* License: MIT
5-
*/
6-
71
// @flow
82

93
import React from 'react';

src/components/defaultStyles.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Globo.com (https://github.com/globocom)
3-
*
4-
* License: MIT
5-
*/
6-
71
// @flow
82

93
import {

src/flatAttributesList.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Globo.com (https://github.com/globocom)
3-
*
4-
* License: MIT
5-
*/
6-
71
// @flow
82

93
const sortInteger = (a: number, b: number): number => a - b;

src/getBlocks.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Globo.com (https://github.com/globocom)
3-
*
4-
* License: MIT
5-
*/
6-
71
// @flow
82

93
import React from 'react';

src/helpers/getItemType.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Globo.com (https://github.com/globocom)
3-
*
4-
* License: MIT
5-
*/
6-
71
// @flow
82

93
const getItemType = (item: Object): string => {

src/loadAttributes.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Globo.com (https://github.com/globocom)
3-
*
4-
* License: MIT
5-
*/
6-
71
// @flow
82

93
import React from 'react';

src/utils/generateKey.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Globo.com (https://github.com/globocom)
3-
*
4-
* License: MIT
5-
*/
6-
71
export default function generateKey(): Number {
82
function s4() {
93
return Math.floor((1 + Math.random()) * 0x10000)

0 commit comments

Comments
 (0)