-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
root: true, | ||
// This tells ESLint to load the config from the package `eslint-config-custom` | ||
extends: ['custom'] | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
.pnp | ||
.pnp.js | ||
|
||
# testing | ||
coverage | ||
|
||
# svelte | ||
.svelte-kit | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# turbo | ||
.turbo |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
auto-install-peers = true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.DS_Store | ||
.svelte-kit | ||
node_modules | ||
/build | ||
/package | ||
.env | ||
.env.* | ||
!.env.example | ||
vite.config.js* | ||
|
||
# Ignore files for PNPM, NPM and YARN | ||
pnpm-lock.yaml | ||
pnpm-workspace.yaml | ||
package-lock.json | ||
yarn.lock |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"useTabs": true, | ||
"singleQuote": false, | ||
"semi": true, | ||
"trailingComma": "es5", | ||
"tabWidth": 4, | ||
"printWidth": 100, | ||
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], | ||
"pluginSearchDirs": ["."], | ||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Turborepo Svelte starter | ||
|
||
This is an official starter Turborepo. | ||
|
||
## What's inside? | ||
|
||
This Turborepo includes the following packages/apps: | ||
|
||
### Apps and Packages | ||
|
||
- `docs`: a [svelte-kit](https://kit.svelte.dev/) app | ||
- `web`: another [svelte-kit](https://kit.svelte.dev/) app | ||
- `ui`: a stub Svelte component library shared by both `web` and `docs` applications | ||
- `eslint-config-custom`: `eslint` configurations (includes `eslint-plugin-svelte` and `eslint-config-prettier`) | ||
|
||
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/). | ||
|
||
### Utilities | ||
|
||
This Turborepo has some additional tools already setup for you: | ||
|
||
- [TypeScript](https://www.typescriptlang.org/) for static type checking | ||
- [ESLint](https://eslint.org/) for code linting | ||
- [Prettier](https://prettier.io) for code formatting | ||
|
||
## Using this example | ||
|
||
Run the following command: | ||
|
||
```sh | ||
npx degit vercel/turbo/examples/with-svelte with-svelte | ||
cd with-svelte | ||
pnpm install | ||
git init . && git add . && git commit -m "Init" | ||
``` |
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['custom'] | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.DS_Store | ||
node_modules | ||
/build | ||
/.svelte-kit | ||
/package | ||
.env | ||
.env.* | ||
!.env.example |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# create-svelte | ||
|
||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). | ||
|
||
## Creating a project | ||
|
||
If you're seeing this, you've probably already done this step. Congrats! | ||
|
||
```bash | ||
# create a new project in the current directory | ||
npm init svelte | ||
|
||
# create a new project in my-app | ||
npm init svelte my-app | ||
``` | ||
|
||
## Developing | ||
|
||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: | ||
|
||
```bash | ||
npm run dev | ||
|
||
# or start the server and open the app in a new browser tab | ||
npm run dev -- --open | ||
``` | ||
|
||
## Building | ||
|
||
To create a production version of your app: | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
You can preview the production build with `npm run preview`. | ||
|
||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "docs", | ||
"private": true, | ||
"version": "0.1.0", | ||
"scripts": { | ||
"dev": "vite dev --port 3001 --open", | ||
"build": "vite build", | ||
"package": "vite package", | ||
"preview": "vite preview", | ||
"check": "svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", | ||
"lint": "prettier --check --ignore-path=../../.prettierignore . && eslint \"src\"", | ||
"format": "prettier --write --ignore-path=../../.prettierignore ." | ||
}, | ||
"dependencies": { | ||
"ui": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "latest", | ||
"@sveltejs/kit": "latest", | ||
"eslint-config-custom": "workspace:*", | ||
"svelte": "^3.44.0", | ||
"svelte-check": "^2.7.1", | ||
"svelte-preprocess": "^4.10.6", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.7.2", | ||
"vite": "^4.0.0" | ||
}, | ||
"type": "module" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference types="@sveltejs/kit" /> | ||
|
||
// 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 Session {} | ||
// interface Stuff {} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%sveltekit.assets%/favicon.png" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
%sveltekit.head% | ||
</head> | ||
<body> | ||
<div>%sveltekit.body%</div> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<script lang="ts"> | ||
import { MyCounterButton } from 'ui'; | ||
</script> | ||
|
||
<h1>Docs</h1> | ||
<MyCounterButton /> | ||
|
||
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import adapter from '@sveltejs/adapter-auto'; | ||
import preprocess from 'svelte-preprocess'; | ||
|
||
/** @type {import('@sveltejs/kit').Config} */ | ||
const config = { | ||
// Consult https://github.com/sveltejs/svelte-preprocess | ||
// for more information about preprocessors | ||
preprocess: preprocess(), | ||
|
||
kit: { | ||
adapter: adapter() | ||
} | ||
}; | ||
|
||
export default config; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": "./.svelte-kit/tsconfig.json", | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"checkJs": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"sourceMap": true, | ||
"strict": true | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { sveltekit } from '@sveltejs/kit/vite'; | ||
|
||
/** @type {import('vite').UserConfig} */ | ||
const config = { | ||
plugins: [sveltekit()] | ||
}; | ||
|
||
export default config; |
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['custom'] | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.DS_Store | ||
node_modules | ||
/build | ||
/.svelte-kit | ||
/package | ||
.env | ||
.env.* | ||
!.env.example |