From d2ab002ec2bc20443c850f5ba275cdb91c6f1465 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Wed, 13 Oct 2021 17:43:40 +0900 Subject: [PATCH] delete wmr --- wmr/.gitignore | 4 --- wmr/package.json | 21 ------------ wmr/public/header.js | 22 ------------ wmr/public/index.html | 15 --------- wmr/public/index.js | 32 ------------------ wmr/public/pages/_404.js | 8 ----- wmr/public/pages/about/index.js | 11 ------ wmr/public/pages/about/style.module.css | 3 -- wmr/public/pages/home/index.js | 24 ------------- wmr/public/pages/home/style.module.css | 4 --- wmr/public/style.css | 45 ------------------------- wmr/tsconfig.json | 17 ---------- wmr/yarn.lock | 23 ------------- 13 files changed, 229 deletions(-) delete mode 100644 wmr/.gitignore delete mode 100644 wmr/package.json delete mode 100644 wmr/public/header.js delete mode 100644 wmr/public/index.html delete mode 100644 wmr/public/index.js delete mode 100644 wmr/public/pages/_404.js delete mode 100644 wmr/public/pages/about/index.js delete mode 100644 wmr/public/pages/about/style.module.css delete mode 100644 wmr/public/pages/home/index.js delete mode 100644 wmr/public/pages/home/style.module.css delete mode 100644 wmr/public/style.css delete mode 100644 wmr/tsconfig.json delete mode 100644 wmr/yarn.lock diff --git a/wmr/.gitignore b/wmr/.gitignore deleted file mode 100644 index bff902b..0000000 --- a/wmr/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.cache -node_modules -dist -stats.html diff --git a/wmr/package.json b/wmr/package.json deleted file mode 100644 index 4cb9364..0000000 --- a/wmr/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "scripts": { - "start": "wmr", - "build": "wmr build --prerender", - "serve": "wmr serve" - }, - "eslintConfig": { - "extends": "preact" - }, - "alias": { - "react": "preact/compat", - "react-dom": "preact/compat" - }, - "dependencies": { - "preact": "^10.5.12", - "preact-iso": "^1.0.0" - }, - "devDependencies": { - "wmr": "^1.2.0" - } -} diff --git a/wmr/public/header.js b/wmr/public/header.js deleted file mode 100644 index d4ead22..0000000 --- a/wmr/public/header.js +++ /dev/null @@ -1,22 +0,0 @@ -import { useLocation } from "preact-iso/router"; - -export default function Header() { - const { url } = useLocation(); - return ( -
- - -
- ); -} diff --git a/wmr/public/index.html b/wmr/public/index.html deleted file mode 100644 index d7d61dc..0000000 --- a/wmr/public/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - WMR App - - - - - - - - - - diff --git a/wmr/public/index.js b/wmr/public/index.js deleted file mode 100644 index d4bbf91..0000000 --- a/wmr/public/index.js +++ /dev/null @@ -1,32 +0,0 @@ -import hydrate from "preact-iso/hydrate"; -import { LocationProvider, Router } from "preact-iso/router"; -import lazy, { ErrorBoundary } from "preact-iso/lazy"; -import Home from "./pages/home/index.js"; -import NotFound from "./pages/_404.js"; -import Header from "./header.js"; - -const About = lazy(() => import("./pages/about/index.js")); - -export function App() { - return ( - -
-
- - - - - - - -
-
- ); -} - -hydrate(); - -export async function prerender(data) { - const { default: prerender } = await import("preact-iso/prerender"); - return await prerender(); -} diff --git a/wmr/public/pages/_404.js b/wmr/public/pages/_404.js deleted file mode 100644 index 0e1b50c..0000000 --- a/wmr/public/pages/_404.js +++ /dev/null @@ -1,8 +0,0 @@ -const NotFound = () => ( -
-

404: Not Found

-

It's gone :(

-
-); - -export default NotFound; diff --git a/wmr/public/pages/about/index.js b/wmr/public/pages/about/index.js deleted file mode 100644 index c583e22..0000000 --- a/wmr/public/pages/about/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import styles from "./style.module.css"; - -const About = ({ query }) => ( -
-

About

-

A page all about this website.

-
{JSON.stringify(query)}
-
-); - -export default About; diff --git a/wmr/public/pages/about/style.module.css b/wmr/public/pages/about/style.module.css deleted file mode 100644 index 1eab45c..0000000 --- a/wmr/public/pages/about/style.module.css +++ /dev/null @@ -1,3 +0,0 @@ -.about { - background: #dbcfe7; -} diff --git a/wmr/public/pages/home/index.js b/wmr/public/pages/home/index.js deleted file mode 100644 index 9f4463c..0000000 --- a/wmr/public/pages/home/index.js +++ /dev/null @@ -1,24 +0,0 @@ -import styles from "./style.module.css"; -import { useState } from "preact/hooks"; - -export default function Home() { - const [count, setCount] = useState(0); - - return ( - <> -
-

Home

-

This is the home page.

- <> - - Count: {count} - - -
- - ); -} diff --git a/wmr/public/pages/home/style.module.css b/wmr/public/pages/home/style.module.css deleted file mode 100644 index 84ba682..0000000 --- a/wmr/public/pages/home/style.module.css +++ /dev/null @@ -1,4 +0,0 @@ -.home { - background: #f6f6f6; - color: #333; -} diff --git a/wmr/public/style.css b/wmr/public/style.css deleted file mode 100644 index ba18c52..0000000 --- a/wmr/public/style.css +++ /dev/null @@ -1,45 +0,0 @@ -html, -body { - margin: 0; - min-height: 100%; - font-family: system-ui, sans-serif; -} - -header { - display: flex; - background: #ddd; -} - -header > nav { - flex: 1; - display: flex; -} - -header > nav a { - padding: 10px; - color: #673ab8; - text-decoration: none; -} - -header > nav a:hover { - background-color: #f1e9ff; -} - -header > label { - display: flex; - align-items: center; - padding: 10px; - color: #555; - font-size: 80%; -} - -header input { - border: none; - border-radius: 3px; - padding: 2px 5px; - font-size: 100%; -} - -.app > section { - padding: 20px; -} diff --git a/wmr/tsconfig.json b/wmr/tsconfig.json deleted file mode 100644 index 6449765..0000000 --- a/wmr/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "jsx": "preserve", - "jsxFactory": "preact.h", - "jsxFragmentFactory": "preact.Fragment", - "allowJs": true, - "checkJs": true, - "strict": true, - "noEmit": true, - "moduleResolution": "node", - "target": "esnext", - "module": "esnext", - "resolveJsonModule": true, - "allowSyntheticDefaultImports": true, - "downlevelIteration": true - } -} diff --git a/wmr/yarn.lock b/wmr/yarn.lock deleted file mode 100644 index a9075e7..0000000 --- a/wmr/yarn.lock +++ /dev/null @@ -1,23 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -fsevents@^2.1.3: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -preact-iso@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/preact-iso/-/preact-iso-1.1.1.tgz#959656bfee479e6a8c6707753e84d4342f61c48b" - integrity sha512-/iG9YH2nlLf3DAEXxCxka6Mux32t2cZEgfbvkNnR9ZtK0yjDRBEHI1IJS6I1AtelAFuBvoD24Ua0sc7wdZb1vg== - -preact@^10.5.12: - version "10.5.13" - resolved "https://registry.yarnpkg.com/preact/-/preact-10.5.13.tgz#85f6c9197ecd736ce8e3bec044d08fd1330fa019" - integrity sha512-q/vlKIGNwzTLu+jCcvywgGrt+H/1P/oIRSD6mV4ln3hmlC+Aa34C7yfPI4+5bzW8pONyVXYS7SvXosy2dKKtWQ== - -wmr@^1.2.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/wmr/-/wmr-1.5.1.tgz#f7630da86ff69eef935c7b8361230482d06bc880" - integrity sha512-CW+cMxaTFsCgBmcQXeuvTJ0rM5+IhOOA0f8xAZdfre63TNlEoOw0T3G8bKYRV7N+SaveF3siRFis96rSVnyMuQ==