Skip to content

Commit ce98761

Browse files
updated
1 parent c391a4e commit ce98761

File tree

122 files changed

+29684
-0
lines changed

Some content is hidden

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

122 files changed

+29684
-0
lines changed

chapter-8/.babel-plugin-macrosrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
styledComponents: {
3+
displayName: process.env.NODE_ENV !== 'production',
4+
},
5+
};

chapter-8/.env.local

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BROWSER=none
2+
EXTEND_ESLINT=true

chapter-8/.env.production

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GENERATE_SOURCEMAP=false

chapter-8/.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cypress

chapter-8/.eslintrc.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
const prettierOptions = JSON.parse(
5+
fs.readFileSync(path.resolve(__dirname, '.prettierrc'), 'utf8'),
6+
);
7+
8+
module.exports = {
9+
extends: [
10+
'react-app',
11+
'prettier',
12+
'prettier/react',
13+
'prettier/@typescript-eslint',
14+
],
15+
plugins: ['prettier'],
16+
rules: {
17+
'prettier/prettier': ['error', prettierOptions],
18+
},
19+
overrides: [
20+
{
21+
files: ['**/*.ts?(x)'],
22+
rules: { 'prettier/prettier': ['warn', prettierOptions] },
23+
},
24+
],
25+
};

chapter-8/.gitattributes

+201
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# From https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes
2+
3+
## GITATTRIBUTES FOR WEB PROJECTS
4+
#
5+
# These settings are for any web project.
6+
#
7+
# Details per file setting:
8+
# text These files should be normalized (i.e. convert CRLF to LF).
9+
# binary These files are binary and should be left untouched.
10+
#
11+
# Note that binary is a macro for -text -diff.
12+
######################################################################
13+
14+
# Auto detect
15+
## Handle line endings automatically for files detected as
16+
## text and leave all files detected as binary untouched.
17+
## This will handle all files NOT defined below.
18+
* text=auto
19+
20+
# Source code
21+
*.bash text eol=lf
22+
*.bat text eol=crlf
23+
*.cmd text eol=crlf
24+
*.coffee text
25+
*.css text
26+
*.htm text diff=html
27+
*.html text diff=html
28+
*.inc text
29+
*.ini text
30+
*.js text
31+
*.json text
32+
*.jsx text
33+
*.less text
34+
*.ls text
35+
*.map text -diff
36+
*.od text
37+
*.onlydata text
38+
*.php text diff=php
39+
*.pl text
40+
*.ps1 text eol=crlf
41+
*.py text diff=python
42+
*.rb text diff=ruby
43+
*.sass text
44+
*.scm text
45+
*.scss text diff=css
46+
*.sh text eol=lf
47+
*.sql text
48+
*.styl text
49+
*.tag text
50+
*.ts text
51+
*.tsx text
52+
*.xml text
53+
*.xhtml text diff=html
54+
55+
# Docker
56+
Dockerfile text
57+
58+
# Documentation
59+
*.ipynb text
60+
*.markdown text
61+
*.md text
62+
*.mdwn text
63+
*.mdown text
64+
*.mkd text
65+
*.mkdn text
66+
*.mdtxt text
67+
*.mdtext text
68+
*.txt text
69+
AUTHORS text
70+
CHANGELOG text
71+
CHANGES text
72+
CONTRIBUTING text
73+
COPYING text
74+
copyright text
75+
*COPYRIGHT* text
76+
INSTALL text
77+
license text
78+
LICENSE text
79+
NEWS text
80+
readme text
81+
*README* text
82+
TODO text
83+
84+
# Templates
85+
*.dot text
86+
*.ejs text
87+
*.haml text
88+
*.handlebars text
89+
*.hbs text
90+
*.hbt text
91+
*.jade text
92+
*.latte text
93+
*.mustache text
94+
*.njk text
95+
*.phtml text
96+
*.tmpl text
97+
*.tpl text
98+
*.twig text
99+
*.vue text
100+
101+
# Configs
102+
*.cnf text
103+
*.conf text
104+
*.config text
105+
.editorconfig text
106+
.env text
107+
.gitattributes text
108+
.gitconfig text
109+
.htaccess text
110+
*.lock text -diff
111+
package-lock.json text -diff
112+
*.toml text
113+
*.yaml text
114+
*.yml text
115+
browserslist text
116+
Makefile text
117+
makefile text
118+
119+
# Heroku
120+
Procfile text
121+
122+
# Graphics
123+
*.ai binary
124+
*.bmp binary
125+
*.eps binary
126+
*.gif binary
127+
*.gifv binary
128+
*.ico binary
129+
*.jng binary
130+
*.jp2 binary
131+
*.jpg binary
132+
*.jpeg binary
133+
*.jpx binary
134+
*.jxr binary
135+
*.pdf binary
136+
*.png binary
137+
*.psb binary
138+
*.psd binary
139+
# SVG treated as an asset (binary) by default.
140+
*.svg text
141+
# If you want to treat it as binary,
142+
# use the following line instead.
143+
# *.svg binary
144+
*.svgz binary
145+
*.tif binary
146+
*.tiff binary
147+
*.wbmp binary
148+
*.webp binary
149+
150+
# Audio
151+
*.kar binary
152+
*.m4a binary
153+
*.mid binary
154+
*.midi binary
155+
*.mp3 binary
156+
*.ogg binary
157+
*.ra binary
158+
159+
# Video
160+
*.3gpp binary
161+
*.3gp binary
162+
*.as binary
163+
*.asf binary
164+
*.asx binary
165+
*.fla binary
166+
*.flv binary
167+
*.m4v binary
168+
*.mng binary
169+
*.mov binary
170+
*.mp4 binary
171+
*.mpeg binary
172+
*.mpg binary
173+
*.ogv binary
174+
*.swc binary
175+
*.swf binary
176+
*.webm binary
177+
178+
# Archives
179+
*.7z binary
180+
*.gz binary
181+
*.jar binary
182+
*.rar binary
183+
*.tar binary
184+
*.zip binary
185+
186+
# Fonts
187+
*.ttf binary
188+
*.eot binary
189+
*.otf binary
190+
*.woff binary
191+
*.woff2 binary
192+
193+
# Executables
194+
*.exe binary
195+
*.pyc binary
196+
197+
# RC files (like .babelrc or .eslintrc)
198+
*.*rc text
199+
200+
# Ignore files (like .npmignore or .gitignore)
201+
*.*ignore text

chapter-8/.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Don't check auto-generated stuff into git
2+
coverage
3+
build
4+
node_modules
5+
stats.json
6+
.pnp
7+
.pnp.js
8+
9+
# misc
10+
.DS_Store
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
# boilerplate internals
20+
generated-cra-app
21+
.cra-template-rb
22+
template
23+
24+
.eslintcache

chapter-8/.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-exact = true

chapter-8/.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lts/dubnium

chapter-8/.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build/
2+
node_modules/
3+
package-lock.json
4+
yarn.lock

chapter-8/.prettierrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": true,
7+
"trailingComma": "all",
8+
"arrowParens": "avoid"
9+
}

chapter-8/.stylelintrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"processors": ["stylelint-processor-styled-components"],
3+
"extends": [
4+
"stylelint-config-recommended",
5+
"stylelint-config-styled-components"
6+
]
7+
}

0 commit comments

Comments
 (0)