Skip to content

Commit

Permalink
Merge pull request #63 from Yoctol/tweak-readme
Browse files Browse the repository at this point in the history
tweak readme
  • Loading branch information
stegben authored Jan 20, 2017
2 parents f684512 + a80fd41 commit 9c8db64
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 24 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Yoctol (github.com/Yoctol/react-d3-cloud)
Copyright (c) 2016-present Yoctol (github.com/Yoctol/react-d3-cloud)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
[![Build Status][travis-image]][travis-url]
[![Dependency Status][david_img]][david_site]

A word cloud react component using [d3-cloud](https://github.com/jasondavies/d3-cloud).
A word cloud react component built with [d3-cloud](https://github.com/jasondavies/d3-cloud).

![image](https://cloud.githubusercontent.com/assets/6868283/20619528/fa83334c-b32f-11e6-81dd-6fe4fa6c52d9.png)

## usage
```
## Usage

```sh
npm install react-d3-cloud
```

Expand Down Expand Up @@ -48,7 +49,7 @@ for more detailed props, please refer to below:

name | description | type | required | default
-----|-------------|------|----------|--------
data | The input data for rendering | Array<{ text: string, value: number }> | ✓ |
data | The input data for rendering | Array<{ text: string, value: number }> | ✓ |
width | Width of component (px) | number | | 700
height | Height of component (px) | number | | 600
fontSizeMapper | Map each element of `data` to font size (px) | Function: `(word: string, idx: number): number` | | `word => word.value;`
Expand All @@ -57,24 +58,31 @@ padding | Map each element of `data` to font padding. Or simply provide a number
font | The font of text shown | Function \| string | | serif


## build
```
## Build

```sh
npm run build
```

## Test

### pre-install
```

```sh
sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
npm install
```

### Run test
```

```sh
npm test
```

## License

MIT © [Yoctol](https://github.com/Yoctol/react-d3-cloud)

[npm-image]: https://img.shields.io/npm/v/react-d3-cloud.svg?style=flat-square
[npm-url]: https://npmjs.org/package/react-d3-cloud
[travis-image]: https://travis-ci.org/Yoctol/react-d3-cloud.svg?branch=master
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,31 @@
},
"homepage": "https://github.com/Yoctol/react-d3-cloud#readme",
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-eslint": "^7.1.0",
"babel-cli": "^6.22.0",
"babel-eslint": "^7.1.1",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-transform-remove-console": "^6.8.0",
"babel-plugin-transform-remove-debugger": "^6.8.0",
"babel-preset-latest": "^6.16.0",
"babel-preset-react": "^6.16.0",
"babel-preset-latest": "^6.22.0",
"babel-preset-react": "^6.22.0",
"babel-preset-react-optimize": "^1.0.1",
"babel-preset-stage-0": "^6.16.0",
"babel-preset-stage-0": "^6.22.0",
"canvas": "^1.6.2",
"enzyme": "^2.6.0",
"eslint": "^3.9.1",
"eslint-config-yoctol": "^0.11.0",
"enzyme": "^2.7.0",
"eslint": "^3.13.1",
"eslint-config-yoctol": "^0.12.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-jsx-a11y": "^3.0.2",
"eslint-plugin-react": "6.9.0",
"jest": "^18.1.0",
"react": "^15.3.2",
"react-addons-test-utils": "^15.3.2",
"react-dom": "^15.3.2",
"react-test-renderer": "^15.3.2"
"react": "^15.4.2",
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.4.2",
"react-test-renderer": "^15.4.2"
},
"dependencies": {
"d3": "^4.3.0",
"d3-cloud": "^1.2.1",
"d3": "^4.4.2",
"d3-cloud": "^1.2.4",
"react-faux-dom": "^3.0.0"
},
"peerDependencies": {
Expand Down

0 comments on commit 9c8db64

Please sign in to comment.