-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 734956e
Showing
37 changed files
with
5,655 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.DS_Store | ||
node_modules | ||
/build | ||
/.svelte-kit | ||
/package | ||
.env | ||
.env.* | ||
!.env.example | ||
|
||
# Ignore files for PNPM, NPM and YARN | ||
pnpm-lock.yaml | ||
package-lock.json | ||
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,20 @@ | ||
module.exports = { | ||
root: true, | ||
parser: "@typescript-eslint/parser", | ||
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], | ||
plugins: ["svelte3", "@typescript-eslint"], | ||
ignorePatterns: ["*.cjs"], | ||
overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }], | ||
settings: { | ||
"svelte3/typescript": () => require("typescript"), | ||
}, | ||
parserOptions: { | ||
sourceType: "module", | ||
ecmaVersion: 2020, | ||
}, | ||
env: { | ||
browser: true, | ||
es2017: true, | ||
node: true, | ||
}, | ||
}; |
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 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
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 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["config:base"] | ||
} |
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,26 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PNPM | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
run_install: true | ||
|
||
- name: Build All | ||
run: pnpm build |
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 @@ | ||
.DS_Store | ||
node_modules | ||
/build | ||
/.svelte-kit | ||
/package | ||
.env | ||
.env.* | ||
!.env.example | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* | ||
|
||
/tmp |
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 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm i |
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 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm lint-staged |
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 @@ | ||
engine-strict=true |
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 @@ | ||
--- | ||
printWidth: 100 | ||
tabWidth: 4 | ||
useTabs: true | ||
trailingComma: all | ||
semi: true | ||
singleQuote: false | ||
|
||
overrides: | ||
- files: "*.md" | ||
options: | ||
useTabs: false | ||
- files: "*.svelte" | ||
options: | ||
parser: svelte | ||
|
||
plugins: | ||
- prettier-plugin-svelte | ||
- prettier-plugin-organize-imports | ||
- prettier-plugin-tailwindcss | ||
|
||
organizeImportsSkipDestructiveCodeActions: true |
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 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"GitHub.copilot", | ||
"GitHub.copilot-labs", | ||
"svelte.svelte-vscode", | ||
"bradlc.vscode-tailwindcss", | ||
"antfu.iconify", | ||
"lokalise.i18n-ally" | ||
] | ||
} |
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,31 @@ | ||
{ | ||
"[svelte]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"[typescript]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"[css]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"[json]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"i18n-ally.localesPaths": ["locales"], | ||
"i18n-ally.keystyle": "nested", | ||
"i18n-ally.sortKeys": true, | ||
"i18n-ally.keepFulfilled": true, | ||
"i18n-ally.extract.parsers.html": { | ||
"attributes": ["text", "title", "alt", "placeholder", "label", "aria-label"], | ||
"ignoredTags": ["script", "style"], | ||
"inlineText": true | ||
}, | ||
"i18n-ally.extract.autoDetect": true, | ||
"i18n-ally.refactor.templates": [ | ||
{ | ||
"source": "html-attribute", | ||
"templates": ["{$t('{key}'{args})}"], | ||
"include": ["src/**/*.{svelte,ts}", "index.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,17 @@ | ||
FROM node:lts-alpine as build-stage | ||
|
||
WORKDIR /app | ||
RUN npm i -g pnpm | ||
COPY package*.json ./ | ||
RUN pnpm install | ||
COPY . . | ||
RUN pnpm run build | ||
RUN pnpm pkg delete scripts.prepare && rm -rf node_modules && pnpm install --production | ||
|
||
FROM node:lts-alpine as production-stage | ||
|
||
WORKDIR /app | ||
COPY --from=build-stage /app/build ./build | ||
COPY --from=build-stage /app/node_modules ./node_modules | ||
COPY --from=build-stage /app/package.json ./package.json | ||
CMD [ "node", "build" ] |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 JacobLinCool | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 @@ | ||
version: "3.9" | ||
|
||
services: | ||
app: | ||
image: "jacoblincool/canary-probe-server:latest" | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- "48080:48080" | ||
environment: | ||
- PORT=48080 | ||
- ORIGIN=http://localhost:48080 | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- ./tmp:/app/tmp |
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 @@ | ||
{ | ||
"$t": "Checking in progress...", | ||
"welcome": "Welcome to SvelteKit+", | ||
"with-tech": "SvelteKit with TailwindCSS, DaisyUI, and I18n!" | ||
} |
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 @@ | ||
{ | ||
"$t": "正在進行檢查 ...", | ||
"welcome": "歡迎使用 SvelteKit+", | ||
"with-tech": "SvelteKit 加上 TailwindCSS、DaisyUI 以及 I18n!" | ||
} |
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,57 @@ | ||
{ | ||
"private": true, | ||
"name": "sveltekit-plus", | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"prepare": "husky install", | ||
"dev": "vite dev", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"test": "playwright test", | ||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
"test:unit": "vitest", | ||
"lint": "prettier --ignore-path .gitignore --check **/*.{ts,js,json,yaml,yml,svelte,html,css} && eslint .", | ||
"format": "prettier --ignore-path .gitignore --write **/*.{ts,js,json,yaml,yml,svelte,html,css}" | ||
}, | ||
"dependencies": { | ||
"canary-probe": "^0.0.1" | ||
}, | ||
"devDependencies": { | ||
"@playwright/test": "^1.38.1", | ||
"@sveltejs/adapter-node": "^1.3.1", | ||
"@sveltejs/kit": "^1.25.0", | ||
"@tailwindcss/typography": "^0.5.10", | ||
"@types/debug": "^4.1.8", | ||
"@typescript-eslint/eslint-plugin": "^6.7.2", | ||
"@typescript-eslint/parser": "^6.7.2", | ||
"autoprefixer": "^10.4.16", | ||
"daisyui": "^3.7.7", | ||
"debug": "^4.3.4", | ||
"eslint": "^8.49.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-svelte": "^2.33.2", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^14.0.1", | ||
"postcss": "^8.4.30", | ||
"prettier": "^3.0.3", | ||
"prettier-plugin-organize-imports": "^3.2.3", | ||
"prettier-plugin-svelte": "^3.0.3", | ||
"prettier-plugin-tailwindcss": "^0.5.4", | ||
"svelte": "^4.2.1", | ||
"svelte-check": "^3.5.2", | ||
"svelte-i18n": "^3.7.4", | ||
"tailwindcss": "^3.3.3", | ||
"tslib": "^2.6.2", | ||
"typescript": "^5.2.2", | ||
"vite": "^4.4.9", | ||
"vitest": "^0.34.5" | ||
}, | ||
"lint-staged": { | ||
"*.{ts,js,json,yaml,yml,svelte,html,css}": [ | ||
"prettier --write" | ||
] | ||
}, | ||
"packageManager": "pnpm@8.7.6" | ||
} |
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,11 @@ | ||
import type { PlaywrightTestConfig } from "@playwright/test"; | ||
|
||
const config: PlaywrightTestConfig = { | ||
webServer: { | ||
command: "npm run build && npm run preview", | ||
port: 4173, | ||
}, | ||
testDir: "tests", | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.