From 5eff436c7988c7c938cec2ea384155c120b0421a Mon Sep 17 00:00:00 2001 From: franciszek Date: Sun, 3 Jan 2021 22:33:35 +0100 Subject: [PATCH] Basic react setup --- package-lock.json | 63 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 6 ++++- src/app.tsx | 8 ++++++ src/index.html | 13 +++++----- tsconfig.json | 1 + 5 files changed, 84 insertions(+), 7 deletions(-) create mode 100644 src/app.tsx diff --git a/package-lock.json b/package-lock.json index 412c1fe..dfe026f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1182,6 +1182,11 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.19.tgz", "integrity": "sha512-4nhBPStMK04rruRVtVc6cDqhu7S9GZai0fpXgPXrFpcPX6Xul8xnrjSdGB4KPBVYG/R5+fXWdCM8qBoiULWGPQ==" }, + "@types/prop-types": { + "version": "15.7.3", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz", + "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==" + }, "@types/q": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", @@ -1197,6 +1202,23 @@ "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz", "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==" }, + "@types/react": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.0.tgz", + "integrity": "sha512-aj/L7RIMsRlWML3YB6KZiXB3fV2t41+5RBGYF8z+tAKU43Px8C3cYUZsDvf1/+Bm4FK21QWBrDutu8ZJ/70qOw==", + "requires": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, + "@types/react-dom": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.0.tgz", + "integrity": "sha512-lUqY7OlkF/RbNtD5nIq7ot8NquXrdFrjSOR6+w9a9RFQevGi1oZO1dcJbXMeONAPKtZ2UrZOEJ5UOCVsxbLk/g==", + "requires": { + "@types/react": "*" + } + }, "@types/serve-static": { "version": "1.13.8", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.8.tgz", @@ -2426,6 +2448,11 @@ "cssom": "0.3.x" } }, + "csstype": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.5.tgz", + "integrity": "sha512-uVDi8LpBUKQj6sdxNaTetL6FpeCqTjOvAQuQUa/qAqq8oOd4ivkbhgnqayl0dnPal8Tb/yB1tF+gOvCBiicaiQ==" + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -4039,6 +4066,14 @@ "chalk": "^2.0.1" } }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, "magic-string": { "version": "0.22.5", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", @@ -5240,6 +5275,25 @@ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, + "react": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.1.tgz", + "integrity": "sha512-lG9c9UuMHdcAexXtigOZLX8exLWkW0Ku29qPRU8uhF2R9BN96dLCt0psvzPLlHc5OWkgymP3qwTRgbnw5BKx3w==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "react-dom": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.1.tgz", + "integrity": "sha512-6eV150oJZ9U2t9svnsspTMrWNyHc6chX0KzDeAOXftRa8bNeOKTTfCJ7KorIwenkHd2xqVTBTCZd79yk/lx/Ug==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "scheduler": "^0.20.1" + } + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -5520,6 +5574,15 @@ "xmlchars": "^2.1.1" } }, + "scheduler": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.1.tgz", + "integrity": "sha512-LKTe+2xNJBNxu/QhHvDR14wUXHRQbVY5ZOYpOGWRzhydZUqrLb2JBvLPY7cAqFmqrWuDED0Mjk7013SZiOz6Bw==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", diff --git a/package.json b/package.json index 3cc3059..cd6476d 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,14 @@ "@types/koa-mount": "^4.0.0", "@types/koa-static": "^4.0.1", "@types/koa__router": "^8.0.3", + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", "koa": "^2.13.0", "koa-mount": "^4.0.0", "koa-static": "^5.0.0", - "parcel-bundler": "^1.12.4" + "parcel-bundler": "^1.12.4", + "react": "^17.0.1", + "react-dom": "^17.0.1" }, "devDependencies": { "typescript": "^4.1.3" diff --git a/src/app.tsx b/src/app.tsx new file mode 100644 index 0000000..b30d2c3 --- /dev/null +++ b/src/app.tsx @@ -0,0 +1,8 @@ +import * as React from "react"; +import * as ReactDOM from "react-dom"; + +const App = () => { + return

Zgłaszańsko

; +}; + +ReactDOM.render(, document.getElementById("root")); diff --git a/src/index.html b/src/index.html index 4f88479..bed9877 100644 --- a/src/index.html +++ b/src/index.html @@ -1,9 +1,10 @@ - - Zgłaszańsko - - -

Zgłaszańsko

- + + Zgłaszańsko + + +
+ + diff --git a/tsconfig.json b/tsconfig.json index 82c9247..5a8ffce 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "jsx": "react", "module": "commonjs", "moduleResolution": "node", "noImplicitAny": true,