1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-31 06:18:07 +00:00

create snowpack

This commit is contained in:
Nebel 2021-10-14 11:06:02 +09:00
parent 22dad8a32a
commit fbff9b126a
8 changed files with 2910 additions and 0 deletions

2
snowpack/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/build/
/node_modules/

11
snowpack/package.json Normal file
View file

@ -0,0 +1,11 @@
{
"devDependencies": {
"@snowpack/plugin-typescript": "^1.2.1",
"preact": "^10.5.15",
"snowpack": "^3.8.8"
},
"scripts": {
"dev": "snowpack dev",
"build": "snowpack build"
}
}

View file

@ -0,0 +1,12 @@
/** @type {import("snowpack").SnowpackUserConfig } */
const config = {
mount: {
src: "/",
},
plugins: ["@snowpack/plugin-typescript"],
buildOptions: {
jsxInject: `import { h, Fragment } from "preact"`,
},
};
export default config;

1
snowpack/src/App.tsx Normal file
View file

@ -0,0 +1 @@
export default () => <>!</>;

10
snowpack/src/index.html Normal file
View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<title>ようこそ</title>
<meta name="viewport" content="width=device-width" />
<script type="module" src="main.js"></script>
</head>
<body></body>
</html>

4
snowpack/src/main.tsx Normal file
View file

@ -0,0 +1,4 @@
import { render } from "preact";
import App from "./App";
render(<App />, document.body);

13
snowpack/tsconfig.json Normal file
View file

@ -0,0 +1,13 @@
{
"compilerOptions": {
"noEmit": true,
"strict": true,
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"lib": ["dom", "dom.iterable", "esnext"],
"jsx": "preserve",
"jsxImportSource": "preact"
},
"include": ["src"]
}

2857
snowpack/yarn.lock Normal file

File diff suppressed because it is too large Load diff