Skip to content

Commit c66e74c

Browse files
Hooks and HMR.
1 parent dfdcf29 commit c66e74c

32 files changed

+10364
-1
lines changed

.babelrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": [["react-app", { "flow": false, "typescript": true }]]
3+
}

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
node_modules
22
dist
33
@types
4-
package-lock.json
54

65
# MacOS
76
.DS_Store

.prettierrc

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

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules\\typescript\\lib"
3+
}

TEST.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
```tsx
2+
3+
const indexes = [0, 1, 2, 3];
4+
5+
const fieldsArrayUsage =
6+
<FieldsArray>
7+
{indexes.map(index => <div arrayKey={`my-array`} index={Number(index)}>
8+
9+
</div>)}
10+
</FieldsArray>
11+
12+
export a = () =>
13+
<Permanent>
14+
<Form>
15+
<TextField name="firstName" initialValue={initialValue}>
16+
<UppercaseNormalizer />
17+
<DebounceValidator value={1000} />
18+
<TextValidator text="John" errorMessage="You ain't John!" />
19+
</TextField>
20+
21+
<NumberField name="age" />
22+
23+
24+
<Converter convert={obj => `${obj.firstName} ${obj.lastName}`}>
25+
<FieldGroup>
26+
<TextField name="firstName" />
27+
<TextField name="lastName" />
28+
</FieldGroup>
29+
</Converter>
30+
31+
32+
33+
</Form>
34+
</Permanent>
35+
36+
const result = {
37+
firstName: "John",
38+
age: ""
39+
}
40+
41+
```

old-package.json.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
"dependencies": {
2+
"@types/node": "11.11.3",
3+
"react": "16.8.4",
4+
"react-dom": "16.8.4",
5+
"tslib": "1.9.3"
6+
},
7+
"devDependencies": {
8+
"@babel/core": "7.3.4",
9+
"@types/jest": "24.0.11",
10+
"@types/react": "16.8.8",
11+
"@types/react-dom": "16.8.2",
12+
"@types/webpack": "4.4.25",
13+
"babel-loader": "8.0.5",
14+
"babel-preset-react-app": "7.0.2",
15+
"cross-env": "5.2.0",
16+
"html-webpack-plugin": "3.2.0",
17+
"html-webpack-root-plugin": "0.10.0",
18+
"istanbul-azure-reporter": "0.1.4",
19+
"jest": "24.5.0",
20+
"jest-dom": "3.1.3",
21+
"jest-junit": "6.3.0",
22+
"react-testing-library": "6.0.0",
23+
"simplr-tslint": "1.0.0-alpha.14",
24+
"source-map-loader": "0.2.4",
25+
"ts-jest": "24.0.0",
26+
"tslint": "5.14.0",
27+
"typescript": "3.4.0-rc",
28+
"webpack": "4.29.6",
29+
"webpack-cli": "3.3.0",
30+
"webpack-dev-server": "3.2.1"
31+
},
32+
"jest": {
33+
"verbose": true,
34+
"preset": "ts-jest",
35+
"reporters": [
36+
"default",
37+
"jest-junit"
38+
],
39+
"collectCoverage": true,
40+
"testRegex": "/__tests__/.*\\.(test|spec).(ts|tsx|js)$",
41+
"collectCoverageFrom": [
42+
"src/**/*.{ts,tsx}",
43+
"!src/index.ts"
44+
],
45+
"coverageReporters": [
46+
"cobertura",
47+
"istanbul-azure-reporter"
48+
]
49+
}

0 commit comments

Comments
 (0)