Initial commit
This commit is contained in:
commit
c3ae023ff7
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules/
|
||||
package-lock.json
|
||||
build/
|
17
README.md
Normal file
17
README.md
Normal file
@ -0,0 +1,17 @@
|
||||
# \<Project name\>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/<Organization name>/<Repo name>/raw/main/logo.svg" alt="<Logo description>" width="150px">
|
||||
</p>
|
||||
|
||||
## Overview
|
||||
|
||||
\<Example text\>
|
||||
|
||||
## Deploy
|
||||
|
||||
\<Deployment instruction\>
|
||||
|
||||
```bash
|
||||
<Code>
|
||||
```
|
20
package.json
Normal file
20
package.json
Normal file
@ -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"
|
||||
}
|
||||
}
|
15
public/index.html
Normal file
15
public/index.html
Normal file
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>React application</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/dist/index.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
2
public/robots.txt
Normal file
2
public/robots.txt
Normal file
@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Allow: /
|
25
snowpack.config.js
Normal file
25
snowpack.config.js
Normal file
@ -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.*"],
|
||||
};
|
3
src/App.tsx
Normal file
3
src/App.tsx
Normal file
@ -0,0 +1,3 @@
|
||||
import React from "react";
|
||||
|
||||
export const App = () => <div>Hello, world</div>;
|
25
src/index.css
Normal file
25
src/index.css
Normal file
@ -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;
|
||||
}
|
17
src/index.tsx
Normal file
17
src/index.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
|
||||
import './index.css'
|
||||
|
||||
import { App } from "./App";
|
||||
|
||||
ReactDOM.render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
document.getElementById("root")
|
||||
);
|
||||
|
||||
if (import.meta.hot) {
|
||||
import.meta.hot.accept();
|
||||
}
|
13
tsconfig.json
Normal file
13
tsconfig.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "react-jsx",
|
||||
"lib": ["DOM"],
|
||||
"module": "ES2020",
|
||||
"moduleResolution": "node"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user