mirror of
https://github.com/kou029w/_.git
synced 2025-01-30 22:08:02 +00:00
create snowpack
This commit is contained in:
parent
22dad8a32a
commit
fbff9b126a
8 changed files with 2910 additions and 0 deletions
2
snowpack/.gitignore
vendored
Normal file
2
snowpack/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/build/
|
||||
/node_modules/
|
11
snowpack/package.json
Normal file
11
snowpack/package.json
Normal 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"
|
||||
}
|
||||
}
|
12
snowpack/snowpack.config.mjs
Normal file
12
snowpack/snowpack.config.mjs
Normal 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
1
snowpack/src/App.tsx
Normal file
|
@ -0,0 +1 @@
|
|||
export default () => <>こんにちは!</>;
|
10
snowpack/src/index.html
Normal file
10
snowpack/src/index.html
Normal 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
4
snowpack/src/main.tsx
Normal file
|
@ -0,0 +1,4 @@
|
|||
import { render } from "preact";
|
||||
import App from "./App";
|
||||
|
||||
render(<App />, document.body);
|
13
snowpack/tsconfig.json
Normal file
13
snowpack/tsconfig.json
Normal 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
2857
snowpack/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue