-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web): add a very basic sveltekit web skeleton
- Loading branch information
1 parent
af3ab92
commit 109b40e
Showing
26 changed files
with
201 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules/ | ||
dist/ | ||
build/ | ||
.svelte-kit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules/ | ||
dist/ | ||
build/ | ||
.svelte-kit/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules/ | ||
dist/ | ||
build/ | ||
.svelte-kit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules/ | ||
dist/ | ||
build/ | ||
.svelte-kit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules/ | ||
dist/ | ||
build/ | ||
.svelte-kit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules/ | ||
dist/ | ||
build/ | ||
.svelte-kit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules/ | ||
dist/ | ||
build/ | ||
.svelte-kit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules/ | ||
dist/ | ||
build/ | ||
.svelte-kit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules/ | ||
dist/ | ||
build/ | ||
.svelte-kit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
extends: ["../../.eslintrc.cjs"], | ||
ignorePatterns: [".eslintrc.cjs", "vite.config.ts"], | ||
|
||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
// project: "./tsconfig.json", | ||
extraFileExtensions: [".svelte"], | ||
}, | ||
|
||
overrides: [ | ||
{ | ||
files: ["*.svelte"], | ||
parser: "svelte-eslint-parser", | ||
parserOptions: { | ||
parser: "@typescript-eslint/parser", | ||
}, | ||
rules: { | ||
// Broken | ||
"no-inner-declarations": 0, | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
node_modules/ | ||
dist/ | ||
build/ | ||
out/ | ||
.svelte-kit/ | ||
.routify/ | ||
package-lock.json | ||
pnpm-lock.yaml | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"plugins": ["prettier-plugin-svelte", "prettier-plugin-sh", "prettier-plugin-pkg"], | ||
"arrowParens": "always", | ||
"bracketSameLine": true, | ||
"bracketSpacing": true, | ||
"endOfLine": "lf", | ||
"htmlWhitespaceSensitivity": "ignore", | ||
"proseWrap": "preserve", | ||
"quoteProps": "consistent", | ||
"trailingComma": "all", | ||
"printWidth": 140, | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": false, | ||
"useTabs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "@espimarisa/hibiki-web", | ||
"version": "2.0.0-alpha", | ||
"type": "module", | ||
"description": "", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/espimarisa/hibiki.git" | ||
}, | ||
"homepage": "https://github.com/espimarisa/hibiki#readme", | ||
"bugs": { | ||
"url": "https://github.com/espimarisa/hibiki/issues" | ||
}, | ||
"author": "Espi Marisa <[email protected]> (https://espi.me)", | ||
"license": "zlib", | ||
"private": true, | ||
"scripts": { | ||
"build": "bun run clean && svelte-kit sync && bunx --bun vite build", | ||
"check": "svelte-kit sync && svelte-check --ignore 'dist' --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
"clean": "rimraf .svelte-kit", | ||
"dev": "svelte-kit sync && bunx --bun vite dev", | ||
"lint": "prettier --c . && eslint .", | ||
"preview": "bunx --bun vite preview", | ||
"start": "NODE_ENV=production bun build/index.js", | ||
"test": "bun run check && pnpm lint" | ||
}, | ||
"dependencies": { | ||
"svelte-adapter-bun": "^0.5.1" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/kit": "^1.25.0", | ||
"eslint": "^8.49.0", | ||
"eslint-plugin-svelte": "^2.33.1", | ||
"postcss": "^8.4.29", | ||
"sass": "^1.67.0", | ||
"svelte": "^4.2.0", | ||
"svelte-check": "^3.5.1", | ||
"svelte-eslint-parser": "^0.33.0", | ||
"vite": "^4.4.9" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// See https://kit.svelte.dev/docs/types#app | ||
// for information about these interfaces | ||
declare global { | ||
namespace App { | ||
// interface Error {} | ||
// interface Locals {} | ||
// interface PageData {} | ||
// interface PageState {} | ||
// interface Platform {} | ||
} | ||
} | ||
|
||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="icon" href="/favicon.png" /> | ||
%sveltekit.head% | ||
</head> | ||
<body data-sveltekit-preload-data="hover"> | ||
<div style="display: contents">%sveltekit.body%</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// place files you want to import through the `$lib` alias in this folder. | ||
console.log("h"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<h1>Welcome to SvelteKit</h1> | ||
<p> | ||
Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> | ||
to read the documentation | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// Variables |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { vitePreprocess } from "@sveltejs/kit/vite"; | ||
import adapter from "svelte-adapter-bun"; | ||
|
||
/** @type {import("@sveltejs/kit").Config} */ | ||
const config = { | ||
// Consult https://kit.svelte.dev/docs/integrations#preprocessors | ||
preprocess: [vitePreprocess({})], | ||
|
||
kit: { | ||
alias: { | ||
$web: "./src", | ||
}, | ||
|
||
adapter: adapter(), | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": ["./.svelte-kit/tsconfig.json", "../../tsconfig.json"], | ||
"include": ["./src/**/*"], | ||
|
||
"compilerOptions": { | ||
"verbatimModuleSyntax": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { sveltekit } from "@sveltejs/kit/vite"; | ||
import { defineConfig } from "vite"; | ||
import path from "node:path"; | ||
|
||
// __dirname replacement in ESM | ||
const pathDirname = path.dirname(Bun.fileURLToPath(new URL(import.meta.url))); | ||
const ROOT_DIRECTORY = path.join(pathDirname, "../../"); | ||
|
||
/** @type {import("vite").defineConfig} */ | ||
export default defineConfig({ | ||
plugins: [sveltekit()], | ||
envDir: ROOT_DIRECTORY, | ||
|
||
css: { | ||
preprocessorOptions: { | ||
scss: { | ||
quietDeps: true, | ||
additionalData: '@use "src/scss/variables.scss" as *;', | ||
}, | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters