Skip to content

Commit 45f2cab

Browse files
authored
Merge pull request #1 from jbarroso/16_refactoring_hooks_remove_containers
16 refactoring hooks remove containers
2 parents 83196c2 + f6d7edc commit 45f2cab

61 files changed

Lines changed: 7997 additions & 220 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/serviceWorker.js

.github/workflows/push.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: TodoMVC React
2+
on: push
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- name: Lint
9+
run: docker-compose run --rm todomvc-front-app npm run eslint
10+
- name: Test
11+
run: docker-compose -f docker-compose.yml -f cypress/docker-compose-cypress.yml up --exit-code-from cypress

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@
2121
npm-debug.log*
2222
yarn-debug.log*
2323
yarn-error.log*
24+
25+
cypress/screenshots
26+
cypress/videos

.storybook/addons.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import addons from '@storybook/addons';
2+
import registerRedux from 'addon-redux/register';
3+
registerRedux(addons);

.storybook/decorators.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react';
2+
import { Provider } from 'react-redux';
3+
import addons from '@storybook/addons';
4+
import withReduxCore from 'addon-redux/withRedux';
5+
import store from './store';
6+
7+
export const withRedux = (state, actions) => withReduxCore(addons)({
8+
Provider, store, state, actions
9+
})

.storybook/main.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
stories: ['../src/**/*.stories.js'],
3+
addons: [
4+
'@storybook/preset-create-react-app',
5+
'@storybook/addon-actions',
6+
'@storybook/addon-links',
7+
'addon-redux/register',
8+
],
9+
};

.storybook/preview.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
import { BrowserRouter } from 'react-router-dom';
3+
import { addDecorator } from '@storybook/react';
4+
5+
import 'todomvc-app-css/index.css';
6+
7+
addDecorator(storyFn =>
8+
<BrowserRouter>
9+
<div className="todoapp">{storyFn()}</div>
10+
</BrowserRouter>
11+
);

.storybook/store.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { createStore } from 'redux';
2+
import withReduxEnhancer from 'addon-redux/enhancer'
3+
import initialState from '../src/reducers/initialState';
4+
5+
export default createStore((state = initialState, _) => state, withReduxEnhancer);

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
# TodoMVC React
2+
3+
## Docker
4+
5+
### `docker-compose up`
6+
Runs the app in the development mode
7+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
8+
9+
### `docker-compose run --rm todomvc-front-app npm test`
10+
Launches the test runner in the interactive watch mode.<br />
11+
12+
### `docker-compose -f docker-compose-nginx.yml up`
13+
Runs the app in the production mode
14+
Open [http://localhost](http://localhost) to view it in the browser.
15+
16+
## Cypress with Docker
17+
18+
### `docker-compose -f docker-compose.yml -f cypress/docker-compose-cypress.yml up --exit-code-from cypress`
19+
Runs Cypress e2e tests
20+
21+
### `docker-compose -f docker-compose.yml -f cypress/docker-compose-cypress.yml -f cypress/docker-compose-cypress-open.yml up`
22+
Opens Cypress Test Runner
23+
24+
## Storybook with Docker
25+
### `docker-compose -f docker-compose-storybook.yml up`
26+
Opens Storybook app
27+
Open [http://localhost:9009](http://localhost:9009) to view it in the browser.
28+
29+
# React Create App
30+
131
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
232

333
## Available Scripts

0 commit comments

Comments
 (0)