Skip to content

Commit 93fc2b8

Browse files
authored
Refactored playground to use create-react-app (#159)
Resolved #151
1 parent acd9b20 commit 93fc2b8

29 files changed

+16378
-5705
lines changed

README.md

+15-8
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ _"This guide is a **living compendium** documenting the most important patterns
2222
### Playground Project
2323
[![Build Status](https://semaphoreci.com/api/v1/piotrekwitek/react-redux-typescript-guide/branches/master/shields_badge.svg)](https://semaphoreci.com/piotrekwitek/react-redux-typescript-guide)
2424

25-
You should check out Playground Project located in the `/playground` folder. It is a source of all the code examples found in the guide. They are all tested with the most recent version of TypeScript and 3rd party type-definitions (like `@types/react` or `@types/react-redux`) to ensure the examples are up-to-date and not broken with updated definitions.
26-
> Playground was created in such a way that you can simply clone the repository locally and immediately play around on your own. It will help you to learn all the examples from this guide in a real project environment without the need to create some complicated environment setup by yourself.
25+
You should check out Playground Project located in the `/playground` folder. It is a source of all the code examples found in the guide. They are all tested with the most recent version of TypeScript and 3rd party type-definitions (like `@types/react` or `@types/react-redux`) to ensure the examples are up-to-date and not broken with updated definitions. It's based on `create-react-app --typescript`.
26+
> Playground project was created so that you can simply clone the repository locally and immediately play around with all the component patterns found in the guide. It will help you to learn all the examples from this guide in a real project environment without the need to create complicated environment setup by yourself.
2727
2828
## Contributing Guide
2929
We are open for contributions. If you're planning to contribute please make sure to read the contributing guide: [CONTRIBUTING.md](/CONTRIBUTING.md)
@@ -1531,11 +1531,15 @@ We have our own recommended `tsconfig.json` that you can easily add to your proj
15311531
15321532
```tsx
15331533
{
1534-
"include": ["src", "typings"],
1534+
"include": [
1535+
"src",
1536+
"typings"
1537+
],
1538+
"exclude": [
1539+
"src/**/*.spec.*"
1540+
],
15351541
"extends": "./node_modules/react-redux-typescript-scripts/tsconfig.json",
1536-
"compilerOptions": {
1537-
// you can further customize options here
1538-
}
1542+
"compilerOptions": {}
15391543
}
15401544

15411545
```
@@ -1576,7 +1580,7 @@ We have our own recommended config that you can easily add to your project thank
15761580
```tsx
15771581
{
15781582
"extends": [
1579-
"react-redux-typescript-scripts/tslint-recommended.json",
1583+
"react-redux-typescript-scripts/tslint.json",
15801584
"react-redux-typescript-scripts/tslint-react.json"
15811585
],
15821586
"rules": {
@@ -1603,7 +1607,10 @@ We have our own recommended config that will automatically add a parser & plugin
16031607
16041608
```tsx
16051609
{
1606-
"extends": ["./node_modules/react-redux-typescript-scripts/eslint.js"],
1610+
"extends": [
1611+
"react-app",
1612+
"./node_modules/react-redux-typescript-scripts/eslint.js"
1613+
],
16071614
"rules": {
16081615
// you can further customize options here
16091616
}

README_SOURCE.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ _"This guide is a **living compendium** documenting the most important patterns
2222
### Playground Project
2323
[![Build Status](https://semaphoreci.com/api/v1/piotrekwitek/react-redux-typescript-guide/branches/master/shields_badge.svg)](https://semaphoreci.com/piotrekwitek/react-redux-typescript-guide)
2424

25-
You should check out Playground Project located in the `/playground` folder. It is a source of all the code examples found in the guide. They are all tested with the most recent version of TypeScript and 3rd party type-definitions (like `@types/react` or `@types/react-redux`) to ensure the examples are up-to-date and not broken with updated definitions.
26-
> Playground was created in such a way that you can simply clone the repository locally and immediately play around on your own. It will help you to learn all the examples from this guide in a real project environment without the need to create some complicated environment setup by yourself.
25+
You should check out Playground Project located in the `/playground` folder. It is a source of all the code examples found in the guide. They are all tested with the most recent version of TypeScript and 3rd party type-definitions (like `@types/react` or `@types/react-redux`) to ensure the examples are up-to-date and not broken with updated definitions. It's based on `create-react-app --typescript`.
26+
> Playground project was created so that you can simply clone the repository locally and immediately play around with all the component patterns found in the guide. It will help you to learn all the examples from this guide in a real project environment without the need to create complicated environment setup by yourself.
2727
2828
## Contributing Guide
2929
We are open for contributions. If you're planning to contribute please make sure to read the contributing guide: [CONTRIBUTING.md](/CONTRIBUTING.md)
@@ -653,10 +653,10 @@ https://jestjs.io/
653653
`npm i -D jest ts-jest @types/jest`
654654
655655
#### jest.config.json
656-
::expander='playground/jest.config.json'::
656+
::expander='configs/jest.config.json'::
657657
658658
#### jest.stubs.js
659-
::expander='playground/jest.stubs.js'::
659+
::expander='configs/jest.stubs.js'::
660660
661661
[⇧ back to top](#table-of-contents)
662662
File renamed without changes.
File renamed without changes.

playground/.eslintrc

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
2-
"extends": ["./node_modules/react-redux-typescript-scripts/eslint.js"],
2+
"extends": [
3+
"react-app",
4+
"./node_modules/react-redux-typescript-scripts/eslint.js"
5+
],
36
"rules": {
47
// you can further customize options here
58
}

playground/.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

0 commit comments

Comments
 (0)