Typescript support implemented

This commit is contained in:
VakarisZ 2020-11-23 16:59:06 +02:00
parent e0a40626be
commit 50c5fdb9fc
3 changed files with 65 additions and 36 deletions

View File

@ -27,85 +27,93 @@
"not dead" "not dead"
], ],
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.8.4", "@babel/cli": "^7.12.1",
"@babel/core": "^7.9.6", "@babel/core": "^7.12.3",
"@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.9.6", "@babel/plugin-transform-runtime": "^7.12.1",
"@babel/preset-env": "^7.9.6", "@babel/preset-env": "^7.12.1",
"@babel/preset-react": "^7.9.0", "@babel/preset-react": "^7.12.5",
"@babel/runtime": "^7.9.6", "@babel/runtime": "^7.12.5",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-loader": "^8.0.0", "babel-loader": "^8.2.1",
"css-loader": "^3.5.0", "copyfiles": "^2.4.0",
"css-loader": "^3.6.0",
"eslint": "^6.8.0", "eslint": "^6.8.0",
"eslint-loader": "^4.0.1", "eslint-loader": "^4.0.1",
"eslint-plugin-react": "^7.19.0", "eslint-plugin-react": "^7.21.5",
"file-loader": "^1.1.11", "file-loader": "^1.1.11",
"glob": "^7.1.6", "glob": "^7.1.6",
"html-loader": "^0.5.5", "html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0", "html-webpack-plugin": "^3.2.0",
"minimist": "^1.2.5", "minimist": "^1.2.5",
"node-sass": "^4.14.1",
"null-loader": "^0.1.1", "null-loader": "^0.1.1",
"react-addons-test-utils": "^15.6.2", "react-addons-test-utils": "^15.6.2",
"rimraf": "^2.7.1", "rimraf": "^2.7.1",
"style-loader": "^0.22.1",
"copyfiles": "^2.2.0",
"url-loader": "^1.1.2",
"sass-loader": "^7.3.1", "sass-loader": "^7.3.1",
"node-sass": "^4.14.1", "style-loader": "^0.22.1",
"webpack": "^4.43.0", "stylelint": "^13.7.2",
"webpack-cli": "^3.3.11", "url-loader": "^1.1.2",
"stylelint": "^13.3.3", "webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0" "webpack-dev-server": "^3.11.0"
}, },
"dependencies": { "dependencies": {
"@emotion/core": "^10.0.34", "@emotion/core": "^10.1.1",
"@fortawesome/fontawesome-svg-core": "^1.2.29", "@fortawesome/fontawesome-svg-core": "^1.2.32",
"@fortawesome/free-regular-svg-icons": "^5.13.1", "@fortawesome/free-regular-svg-icons": "^5.15.1",
"@fortawesome/free-solid-svg-icons": "^5.13.1", "@fortawesome/free-solid-svg-icons": "^5.15.1",
"@fortawesome/react-fontawesome": "^0.1.11", "@fortawesome/react-fontawesome": "^0.1.12",
"@kunukn/react-collapse": "^1.2.7", "@kunukn/react-collapse": "^1.2.7",
"bootstrap": "^4.5.2", "@types/jest": "^26.0.15",
"@types/node": "^14.14.9",
"@types/react": "^16.9.56",
"@types/react-dom": "^16.9.9",
"bootstrap": "^4.5.3",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"core-js": "^3.6.5", "core-js": "^3.7.0",
"d3": "^5.14.1", "d3": "^5.14.1",
"downloadjs": "^1.4.7", "downloadjs": "^1.4.7",
"fetch": "^1.1.0", "fetch": "^1.1.0",
"file-saver": "^2.0.2", "file-saver": "^2.0.2",
"filepond": "^4.19.2", "filepond": "^4.23.1",
"jwt-decode": "^2.2.0", "jwt-decode": "^2.2.0",
"lodash": "^4.17.20", "lodash": "^4.17.20",
"marked": "^2.0.0", "marked": "^2.0.0",
"normalize.css": "^8.0.0", "normalize.css": "^8.0.0",
"npm": "^6.14.7", "npm": "^6.14.8",
"pluralize": "^7.0.0", "pluralize": "^7.0.0",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",
"rainge": "^1.0.1", "rainge": "^1.0.1",
"rc-progress": "^2.6.1", "rc-progress": "^2.6.1",
"react": "^16.12.0", "react": "^16.14.0",
"react-bootstrap": "^1.3.0", "react-bootstrap": "^1.4.0",
"react-copy-to-clipboard": "^5.0.2", "react-copy-to-clipboard": "^5.0.2",
"react-data-components": "^1.2.0", "react-data-components": "^1.2.0",
"react-desktop-notification": "^1.0.9", "react-desktop-notification": "^1.0.9",
"react-dimensions": "^1.3.0", "react-dimensions": "^1.3.0",
"react-dom": "^16.12.0", "react-dom": "^16.14.0",
"react-event-timeline": "^1.6.3", "react-event-timeline": "^1.6.3",
"react-fa": "^5.0.0", "react-fa": "^5.0.0",
"react-filepond": "^7.0.1", "react-filepond": "^7.1.0",
"react-graph-vis": "^1.0.5", "react-graph-vis": "^1.0.5",
"react-hot-loader": "^4.12.20", "react-hot-loader": "^4.13.0",
"react-json-tree": "^0.12.0", "react-json-tree": "^0.12.1",
"react-jsonschema-form-bs4": "^1.7.1", "react-jsonschema-form-bs4": "^1.7.1",
"react-particles-js": "^3.3.0", "react-particles-js": "^3.4.1",
"react-redux": "^5.1.2", "react-redux": "^5.1.2",
"react-router-dom": "^4.3.1", "react-router-dom": "^5.2.0",
"react-spinners": "^0.9.0", "react-spinners": "^0.9.0",
"react-step-wizard": "^5.3.5",
"react-table": "^6.10.3", "react-table": "^6.10.3",
"react-toggle": "^4.1.1", "react-toggle": "^4.1.1",
"react-tooltip-lite": "^1.12.0", "react-tooltip-lite": "^1.12.0",
"redux": "^4.0.4", "redux": "^4.0.4",
"sha3": "^2.1.3", "sha3": "^2.1.3",
"snyk": "^1.373.1" "snyk": "^1.427.0",
"source-map-loader": "^1.1.2",
"ts-loader": "^8.0.11",
"typescript": "^4.1.2"
}, },
"snyk": true "snyk": true
} }

View File

@ -0,0 +1,13 @@
{
"compilerOptions": {
"sourceMap": true,
"module": "commonjs",
"target": "es5",
"jsx": "react",
"esModuleInterop": true
},
"include": [
"src"
],
"compileOnSave": false
}

View File

@ -4,6 +4,13 @@ const HtmlWebPackPlugin = require("html-webpack-plugin");
module.exports = { module.exports = {
module: { module: {
rules: [ rules: [
{ test: /\.tsx?$/,
loader: "ts-loader"
},
{
test: /\.js$/,
loader: "source-map-loader"
},
{ {
test: /\.js$/, test: /\.js$/,
exclude: /node_modules/, exclude: /node_modules/,
@ -54,6 +61,7 @@ module.exports = {
} }
] ]
}, },
devtool: "source-map",
plugins: [ plugins: [
new HtmlWebPackPlugin({ new HtmlWebPackPlugin({
template: "./src/index.html", template: "./src/index.html",
@ -61,7 +69,7 @@ module.exports = {
}) })
], ],
resolve: { resolve: {
extensions: ['.js', '.jsx', '.css'], extensions: ['.ts', '.tsx', '.js', '.jsx', '.css'],
modules: [ modules: [
'node_modules', 'node_modules',
path.resolve(__dirname, 'src/') path.resolve(__dirname, 'src/')