diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..3897265 --- /dev/null +++ b/.eslintignore @@ -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 diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..3ccf435 --- /dev/null +++ b/.eslintrc.cjs @@ -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 + } +}; diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f4401a3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +node_modules +/build +/.svelte-kit +/package +.env +.env.* +!.env.example diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..b6f27f1 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..3897265 --- /dev/null +++ b/.prettierignore @@ -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 diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..ff2677e --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100 +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..27583b9 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# SVELTE-DUPLY sveltekit template + +simple sveltekit template for single page app building. + +## Setup + +- Clone/fork this repository (or click `use this template`) +- `yarn` or `npm install` +- `yarn dev` or `npm run dev` + +## Build from + +- Sveltekit + vite (Typescript) +- [Tailwindcss](https://tailwindcss.com) +- [DaisyUi](https://daisyui.com) \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..4c64929 --- /dev/null +++ b/package.json @@ -0,0 +1,43 @@ +{ + "name": "svelte-duply", + "version": "0.0.1", + "scripts": { + "dev": "vite dev", + "build": "vite build", + "package": "svelte-kit package", + "preview": "vite preview", + "test": "playwright test", + "check": "svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "prettier --check --plugin-search-dir=. . && eslint .", + "format": "prettier --write --plugin-search-dir=. ." + }, + "devDependencies": { + "@playwright/test": "^1.22.2", + "@sveltejs/adapter-auto": "next", + "@sveltejs/kit": "next", + "@typescript-eslint/eslint-plugin": "^5.27.0", + "@typescript-eslint/parser": "^5.27.0", + "autoprefixer": "^10.4.7", + "daisyui": "^2.22.0", + "eslint": "^8.16.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-svelte3": "^4.0.0", + "postcss": "^8.4.14", + "postcss-load-config": "^4.0.1", + "prettier": "^2.6.2", + "prettier-plugin-svelte": "^2.7.0", + "svelte": "^3.44.0", + "svelte-check": "^2.7.1", + "svelte-preprocess": "^4.10.7", + "svelte-share-buttons-component": "^1.5.0", + "tailwindcss": "^3.1.5", + "theme-change": "^2.2.0", + "tslib": "^2.3.1", + "typescript": "^4.7.4", + "vite": "^3.0.0" + }, + "type": "module", + "license": "MIT", + "dependencies": {} +} diff --git a/playwright.config.ts b/playwright.config.ts new file mode 100644 index 0000000..6ad3a7f --- /dev/null +++ b/playwright.config.ts @@ -0,0 +1,10 @@ +import type { PlaywrightTestConfig } from '@playwright/test'; + +const config: PlaywrightTestConfig = { + webServer: { + command: 'npm run build && npm run preview', + port: 4173 + } +}; + +export default config; diff --git a/postcss.config.cjs b/postcss.config.cjs new file mode 100644 index 0000000..fe10e55 --- /dev/null +++ b/postcss.config.cjs @@ -0,0 +1,13 @@ +const tailwindcss = require('tailwindcss'); +const autoprefixer = require('autoprefixer'); + +const config = { + plugins: [ + //Some plugins, like tailwindcss/nesting, need to run before Tailwind, + tailwindcss(), + //But others, like autoprefixer, need to run after, + autoprefixer + ] +}; + +module.exports = config; diff --git a/src/app.css b/src/app.css new file mode 100644 index 0000000..1a7b7cf --- /dev/null +++ b/src/app.css @@ -0,0 +1,4 @@ +/* Write your global styles here, in PostCSS syntax */ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/src/app.d.ts b/src/app.d.ts new file mode 100644 index 0000000..f69cbcb --- /dev/null +++ b/src/app.d.ts @@ -0,0 +1,11 @@ +// See https://kit.svelte.dev/docs/types#app +// for information about these interfaces +// and what to do when importing types +declare namespace App { + // interface Locals {} + // interface Platform {} + // interface PrivateEnv {} + // interface PublicEnv {} + // interface Session {} + // interface Stuff {} +} diff --git a/src/app.html b/src/app.html new file mode 100644 index 0000000..37bf6ac --- /dev/null +++ b/src/app.html @@ -0,0 +1,13 @@ + + +
+ + + + + %sveltekit.head% + + +