Skip to content

Commit d01e018

Browse files
author
Edward Xiao
committed
no message
1 parent b221e47 commit d01e018

Some content is hidden

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

48 files changed

+3390
-7370
lines changed

.babelrc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"presets": ["@babel/preset-env", "@babel/preset-react"],
2+
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"],
33
"env":
44
{
55
"development":
@@ -12,7 +12,11 @@
1212
},
1313
"lib":
1414
{
15-
"plugins": ["css-modules-transform"],
15+
"plugins": [
16+
"css-modules-transform",
17+
"@babel/proposal-class-properties",
18+
"@babel/proposal-object-rest-spread"
19+
],
1620
},
1721
"test":
1822
{

dist/index.html

Lines changed: 0 additions & 17 deletions
This file was deleted.

dist/rev-manifest.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import prefixAll from 'inline-style-prefix-all';
99
import Prism from 'prismjs';
1010
import 'prismjs/themes/prism-tomorrow.css';
1111
import STYLES from '../src/css/example.css';
12-
import { Textbox, Textarea, Radiobox, Checkbox, Select } from '../src/js/Inputs/index.tsx';
12+
import { Textbox, Textarea, Radiobox, Checkbox, Select } from '../src/js/Inputs/index.ts';
1313

1414
const markdownTextboxEmptyExample = `
1515
\`\`\`javascript

jest.config.js

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
module.exports = {
2-
verbose: true,
3-
moduleNameMapper: {
4-
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/assetsTransformer.js',
5-
'\\.(css|less)$': 'identity-obj-proxy',
6-
'^STYLES(.*)$': '<rootDir>/src/css$1',
7-
'^COMPONENTS(.*)$': '<rootDir>/src/js/app/components$1',
8-
'^API(.*)$': '<rootDir>/src/js/api$1',
9-
'^CONFIG(.*)$': '<rootDir>/src/config$1',
10-
'^IMAGES(.*)$': '<rootDir>/src/image$1',
11-
'^AUDIOS(.*)$': '<rootDir>/audio/api$1',
12-
'^VIDEOS(.*)$': '<rootDir>/src/video$1',
13-
'^LOCALES(.*)$': '<rootDir>/src/locales$1',
14-
'^COMMON(.*)$': '<rootDir>/src/js/common$1',
15-
'^APP(.*)$': '<rootDir>/src/js/app$1',
16-
'^CONSTS(.*)$': '<rootDir>/src/js/consts$1',
17-
'^PAGES(.*)$': '<rootDir>/src/js/api$1',
18-
'^ACTIONS(.*)$': '<rootDir>/src/js/actions$1',
19-
'^STORE(.*)$': '<rootDir>/src/js/store$1',
20-
'^REDUCERS(.*)$': '<rootDir>/src/js/reducers$1',
21-
'^VENDOR(.*)$': '<rootDir>/src/js/vendor$1',
22-
}
2+
preset: 'ts-jest',
3+
transform: {
4+
'^.+\\.(js|jsx)$': 'babel-jest',
5+
'^.+\\.tsx?$': 'ts-jest',
6+
},
7+
verbose: true,
8+
moduleNameMapper: {
9+
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/assetsTransformer.js',
10+
'\\.(css|scss)$': 'identity-obj-proxy',
11+
'^STYLES(.*)$': '<rootDir>/src/css$1',
12+
'^COMPONENTS(.*)$': '<rootDir>/src/js/app/components$1',
13+
'^API(.*)$': '<rootDir>/src/js/api$1',
14+
'^CONFIG(.*)$': '<rootDir>/src/config$1',
15+
'^IMAGES(.*)$': '<rootDir>/src/image$1',
16+
'^AUDIOS(.*)$': '<rootDir>/audio/api$1',
17+
'^VIDEOS(.*)$': '<rootDir>/src/video$1',
18+
'^LOCALES(.*)$': '<rootDir>/src/locales$1',
19+
'^COMMON(.*)$': '<rootDir>/src/js/common$1',
20+
'^APP(.*)$': '<rootDir>/src/js/app$1',
21+
'^CONSTS(.*)$': '<rootDir>/src/js/consts$1',
22+
'^PAGES(.*)$': '<rootDir>/src/js/api$1',
23+
'^ACTIONS(.*)$': '<rootDir>/src/js/actions$1',
24+
'^STORE(.*)$': '<rootDir>/src/js/store$1',
25+
'^REDUCERS(.*)$': '<rootDir>/src/js/reducers$1',
26+
'^VENDOR(.*)$': '<rootDir>/src/js/vendor$1',
27+
},
2328
};

0 commit comments

Comments
 (0)