From c3ae023ff77f648724ffb4bc4b68170f846462f5 Mon Sep 17 00:00:00 2001 From: Dmitriy Shishkov Date: Mon, 11 Oct 2021 12:29:15 +0500 Subject: [PATCH] Initial commit --- .gitignore | 3 +++ README.md | 17 +++++++++++++++++ package.json | 20 ++++++++++++++++++++ public/index.html | 15 +++++++++++++++ public/robots.txt | 2 ++ snowpack.config.js | 25 +++++++++++++++++++++++++ src/App.tsx | 3 +++ src/index.css | 25 +++++++++++++++++++++++++ src/index.tsx | 17 +++++++++++++++++ tsconfig.json | 13 +++++++++++++ 10 files changed, 140 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 package.json create mode 100644 public/index.html create mode 100644 public/robots.txt create mode 100644 snowpack.config.js create mode 100644 src/App.tsx create mode 100644 src/index.css create mode 100644 src/index.tsx create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7d245c9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +package-lock.json +build/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..8a12f42 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# \ + +

+ <Logo description> +

+ +## Overview + +\ + +## Deploy + +\ + +```bash + +``` diff --git a/package.json b/package.json new file mode 100644 index 0000000..8e8f93f --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "scripts": { + "dev": "snowpack dev", + "build": "snowpack build", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "devDependencies": { + "@snowpack/plugin-typescript": "^1.2.1", + "@types/node": "^15.0.1", + "@types/react": "^17.0.4", + "@types/react-dom": "^17.0.3", + "@types/snowpack-env": "^2.3.3", + "snowpack": "^3.3.5", + "typescript": "^4.2.4" + }, + "dependencies": { + "react": "^17.0.2", + "react-dom": "^17.0.2" + } +} diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..db5f1ff --- /dev/null +++ b/public/index.html @@ -0,0 +1,15 @@ + + + + + + + React application + + + +
+ + + + \ No newline at end of file diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..14267e9 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: / \ No newline at end of file diff --git a/snowpack.config.js b/snowpack.config.js new file mode 100644 index 0000000..2cba93b --- /dev/null +++ b/snowpack.config.js @@ -0,0 +1,25 @@ +// Snowpack Configuration File +// See all supported options: https://www.snowpack.dev/reference/configuration + +/** @type {import("snowpack").SnowpackUserConfig } */ +module.exports = { + plugins: ["@snowpack/plugin-typescript"], + packageOptions: { + polyfillNode: true, + }, + mount: { + public: "/", + src: "/dist", + }, + optimize: { + bundle: true, + }, + routes: [ + { match: "routes", src: "robots.txt", dest: "/robots.txt" }, + { match: "routes", src: ".*", dest: "/index.html" }, + ], + devOptions: { + open: "none", + }, + exclude: ["**/node_modules/**/*", "**/*.test.*"], +}; diff --git a/src/App.tsx b/src/App.tsx new file mode 100644 index 0000000..e57a5c7 --- /dev/null +++ b/src/App.tsx @@ -0,0 +1,3 @@ +import React from "react"; + +export const App = () =>
Hello, world
; diff --git a/src/index.css b/src/index.css new file mode 100644 index 0000000..2ecc5ad --- /dev/null +++ b/src/index.css @@ -0,0 +1,25 @@ +* { + margin: 0; + padding: 0; + -ms-overflow-style: none; + scrollbar-width: none; + box-sizing: border-box; + outline: none; +} + +*::-webkit-scrollbar { + display: none; +} + +body { + font-family: Inter, system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + background: rgba(54, 54, 69, 0.05) none repeat scroll 0% 0%; + color: rgb(54, 54, 69); +} + +code { + font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", + monospace; +} diff --git a/src/index.tsx b/src/index.tsx new file mode 100644 index 0000000..0f66784 --- /dev/null +++ b/src/index.tsx @@ -0,0 +1,17 @@ +import React from "react"; +import ReactDOM from "react-dom"; + +import './index.css' + +import { App } from "./App"; + +ReactDOM.render( + + + , + document.getElementById("root") +); + +if (import.meta.hot) { + import.meta.hot.accept(); +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..7264e4b --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es5", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react-jsx", + "lib": ["DOM"], + "module": "ES2020", + "moduleResolution": "node" + } +}