Skip to content

Commit a66cf4b

Browse files
committed
v1.0.6
1 parent 735edfd commit a66cf4b

30 files changed

Lines changed: 1530 additions & 1409 deletions

.eslintrc.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,20 @@ module.exports = {
77
'prettier/@typescript-eslint',
88
],
99
parser: '@typescript-eslint/parser',
10+
parserOptions: {
11+
ecmaVersion: 2018,
12+
sourceType: 'module',
13+
ecmaFeatures: {
14+
jsx: true,
15+
}
16+
},
1017
plugins: [
1118
'@typescript-eslint',
1219
'prettier',
1320
'react-hooks',
1421
],
1522
rules: {
16-
'prettier/prettier': [
17-
'error',
18-
{
19-
bracketSpacing: true,
20-
jsxBracketSameLine: true,
21-
singleQuote: true,
22-
tabWidth: 2,
23-
trailingComma: 'all',
24-
useTabs: false,
25-
},
26-
],
23+
'@typescript-eslint/explicit-function-return-type': 'off',
2724
'react-hooks/rules-of-hooks': 'error',
2825
'react-hooks/exhaustive-deps': 'warn',
2926
},
@@ -32,4 +29,4 @@ module.exports = {
3229
version: 'detect',
3330
},
3431
},
35-
};
32+
};

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
public/
2+
node_modules/

.prettierrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
'bracketSpacing': true,
3+
'jsxBracketSameLine': true,
4+
'singleQuote': true,
5+
'tabWidth': 2,
6+
'trailingComma': 'all',
7+
'useTabs': false,
8+
};

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.0.6](https://github.com/chrisrzhou/react-wordcloud/compare/v1.0.5...v1.0.6) (2019-06-08)
7+
8+
- Support deterministic behavior for randomn layout and colors by configuring the `options.deterministic` field. This makes testing and creating fixed wordcloud views convenient.
9+
- Expose Typescript types.
10+
- Use various `d3-*` packages instead of importing `d3` entirely.
11+
- Update `docz` and docs. Add Codesandbox examples.
12+
- Move prettier rules from `.eslintrc.js` to `.prettierrc.js`. This supports better formatting in MDX files with VSCode.
13+
614
## [1.0.5](https://github.com/chrisrzhou/react-wordcloud/compare/v1.0.4...v1.0.5) (2019-03-16)
715

816
### New:

README.md

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Simple React + D3 wordcloud component with powerful features. Uses the [`d3-cloud`](https://github.com/jasondavies/d3-cloud) layout.
44

5-
![image](https://github.com/chrisrzhou/react-wordcloud/raw/master/wordcloud.png)
5+
![image](/public/wordcloud.png)
66

77
## Install
88

@@ -16,37 +16,28 @@ Note that `react-wordcloud` requires `react^16.8.3` as a peer dependency.
1616

1717
### Documented Examples
1818

19-
View all documented examples and gallery of `react-globe` applications at https://react-globe.netlify.com/.
19+
View all documented examples and gallery of `react-wordcloud` applications at https://react-wordcloud.netlify.com/.
2020

2121
### Local Examples
2222

2323
You can also run the examples locally:
2424

2525
```bash
26-
git clone git@github.com:chrisrzhou/react-globe
27-
28-
cd react-globe
29-
yarn
30-
yarn dev
26+
git clone git@github.com:chrisrzhou/react-wordcloud
27+
cd react-wordcloud && yarn && yarn dev
3128
```
3229

3330
### Basic Example (no props)
3431

35-
<img src="/public/basic.png" width="500px" />
36-
37-
[![Edit react-globe-simple](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/bgov9)
32+
[![Edit react-wordcloud-simple](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/bgov9)
3833

3934
### Responsive Example
4035

41-
<img src="/public/basic.png" width="500px" />
42-
43-
[![Edit react-globe-simple](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/55sb8)
36+
[![Edit react-wordcloud-simple](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/55sb8)
4437

4538
### Configurable Options Example
4639

47-
<img src="/public/options.png" width="500px" />
48-
49-
[![Edit react-globe-interactive](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/fnk8w)
40+
[![Edit react-wordcloud-interactive](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/fnk8w)
5041

5142
## Development
5243

@@ -71,22 +62,15 @@ Feel free to contribute by submitting a pull request.
7162

7263
## Wordcloud Generator
7364

74-
Create wordclouds using this wordcloud generator: https://chrisrzhou.github.io/wordcloud-generator/
65+
Create wordclouds using this wordcloud generator: https://wordcloud-generator.netlify.com/
7566

7667
Features supported:
7768

78-
- Editing and uploading text inputs
69+
- Edit and Upload text inputs
7970
- Various NLP methods (stopwords, ngrams)
8071
- Wordcloud configurations
8172
- Export/save/share wordclouds
8273

83-
## TODOs
84-
85-
- [ ] Update dependencies and `docz`
86-
- [ ] Expose types
87-
- [ ] Update CHANGELOG
88-
- [ ] Update `react-wordcloud-generator`
89-
9074
## Donate
9175

9276
My projects will always be (ads-)free. I constantly learn from the community, so these projects are a way of giving back to the community. If you liked this project or find it useful, feel free to buy me a cup of coffee ☕️ through a small donation!

docs/ReactWordcloud.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '../src';

docs/changelog.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ name: CHANGELOG
33
route: /changelog
44
---
55

6-
import Changelog from "./../CHANGELOG.md";
6+
import Changelog from '../CHANGELOG.md';
77

88
<Changelog />

docs/faq.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ name: FAQ
33
route: /faq
44
---
55

6-
import { Playground } from "docz";
7-
import ReactWordcloud from "./../src";
6+
import { Playground } from 'docz';
7+
8+
import ReactWordcloud from './ReactWordcloud';
89

910
# FAQ
1011

@@ -22,9 +23,9 @@ This issue happens when the most frequent word is also the **longest** word. For
2223
<ReactWordcloud
2324
size={[200, 200]}
2425
words={[
25-
{ text: "this_is_a_long_word_and_also_the_most_frequent", value: 45 },
26-
{ text: "some_word", value: 35 },
27-
{ text: "another_word", value: 20 }
26+
{ text: 'this_is_a_long_word_and_also_the_most_frequent', value: 45 },
27+
{ text: 'some_word', value: 35 },
28+
{ text: 'another_word', value: 20 },
2829
]}
2930
/>
3031
</Playground>

docs/introduction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ name: README
33
route: /
44
---
55

6-
import ReadMe from "./../README.md";
6+
import ReadMe from './../README.md';
77

88
<ReadMe />

docs/props.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: Props
3+
route: /props
4+
---
5+
6+
import { Props } from 'docz';
7+
8+
import ReactWordcloud from './ReactWordcloud';
9+
10+
# Props
11+
12+
<Props of={ReactWordcloud} />

0 commit comments

Comments
 (0)