├── apps
├── web
│ ├── src
│ │ ├── app.css
│ │ ├── global.d.ts
│ │ ├── routes
│ │ │ ├── __layout.svelte
│ │ │ ├── index.svelte
│ │ │ └── __error.svelte
│ │ └── app.html
│ ├── .npmrc
│ ├── README.md
│ ├── static
│ │ ├── robots.txt
│ │ └── favicon.png
│ ├── .gitignore
│ ├── svelte.config.js
│ ├── .eslintrc.cjs
│ ├── package.json
│ └── tsconfig.json
└── docs
│ ├── .npmrc
│ ├── src
│ ├── global.d.ts
│ ├── lib
│ │ ├── index.ts
│ │ └── PageComponents
│ │ │ ├── ComponentPreview.svelte
│ │ │ └── Navbar.svelte
│ ├── routes
│ │ ├── changelog
│ │ │ ├── index.svx
│ │ │ └── __layout.svelte
│ │ ├── __layout.svelte
│ │ ├── docs
│ │ │ ├── button.svx
│ │ │ ├── index.svx
│ │ │ ├── markdown.svx
│ │ │ └── __layout.svelte
│ │ └── index.svelte
│ ├── app.css
│ └── app.html
│ ├── static
│ ├── favicon.png
│ └── sveleton logo.png
│ ├── .prettierrc
│ ├── .gitignore
│ ├── tailwind.config.cjs
│ ├── postcss.config.cjs
│ ├── .eslintrc.cjs
│ ├── tsconfig.json
│ ├── svelte.config.js
│ ├── LICENSE
│ ├── package.json
│ └── README.md
├── .npmrc
├── .eslintignore
├── .eslintrc.cjs
├── packages
├── rename-core
│ ├── src
│ │ ├── global.d.ts
│ │ ├── lib
│ │ │ ├── index.ts
│ │ │ └── Counter
│ │ │ │ ├── Counter.svelte
│ │ │ │ └── Counter.scss
│ │ ├── routes
│ │ │ └── index.svelte
│ │ └── app.html
│ ├── .gitignore
│ ├── svelte.config.js
│ ├── package.json
│ ├── tsconfig.json
│ ├── README.md
│ └── package-lock.json
├── rename-tsconfig
│ ├── README.md
│ ├── package.json
│ ├── svelte.json
│ └── base.json
└── eslint-preset-rename
│ └── eslint-preset-svelteui
│ ├── package.json
│ └── index.js
├── .prettierrc
├── .gitignore
├── turbo.json
├── package.json
├── LICENSE
└── README.md
/apps/web/src/app.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
--------------------------------------------------------------------------------
/apps/web/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 |
--------------------------------------------------------------------------------
/apps/docs/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | dist
2 | public
3 | .cache
4 | .eslintrc.js
5 | *.d.ts
--------------------------------------------------------------------------------
/apps/web/README.md:
--------------------------------------------------------------------------------
1 | # Rename web
2 |
3 | Optional web package
4 |
--------------------------------------------------------------------------------
/apps/web/src/global.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/apps/docs/src/global.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = require('./packages/eslint-preset-rename');
2 |
--------------------------------------------------------------------------------
/packages/rename-core/src/global.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/apps/web/static/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
--------------------------------------------------------------------------------
/packages/rename-core/src/lib/index.ts:
--------------------------------------------------------------------------------
1 | export { default as Counter } from './Counter/Counter.svelte';
2 |
--------------------------------------------------------------------------------
/apps/web/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kamellperry/turbosvelte/HEAD/apps/web/static/favicon.png
--------------------------------------------------------------------------------
/packages/rename-core/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /build
4 | /.svelte-kit
5 | /package
6 | .env
7 |
--------------------------------------------------------------------------------
/apps/docs/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kamellperry/turbosvelte/HEAD/apps/docs/static/favicon.png
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "useTabs": true,
3 | "singleQuote": true,
4 | "trailingComma": "none",
5 | "printWidth": 100
6 | }
7 |
--------------------------------------------------------------------------------
/apps/docs/static/sveleton logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kamellperry/turbosvelte/HEAD/apps/docs/static/sveleton logo.png
--------------------------------------------------------------------------------
/apps/web/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /build
4 | /.svelte-kit
5 | /package
6 | .env
7 | .env.*
8 | !.env.example
9 |
--------------------------------------------------------------------------------
/apps/docs/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "useTabs": true,
3 | "singleQuote": true,
4 | "trailingComma": "none",
5 | "printWidth": 100
6 | }
7 |
--------------------------------------------------------------------------------
/packages/rename-tsconfig/README.md:
--------------------------------------------------------------------------------
1 | # `tsconfig`
2 |
3 | This is the base shared `tsconfig.json` from which all other `tsconfig.json`'s inherit from.
--------------------------------------------------------------------------------
/apps/docs/src/lib/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * This file is for exporting defaults to be used throughout the docs if you choose
3 | */
4 |
5 | export {};
6 |
--------------------------------------------------------------------------------
/apps/docs/src/lib/PageComponents/ComponentPreview.svelte:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/apps/docs/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /build
4 | /.svelte-kit
5 | /package
6 | .env
7 | .env.*
8 | !.env.example
9 | /bin
10 | /.svelte-kit
11 | /package
--------------------------------------------------------------------------------
/packages/rename-core/src/routes/index.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 | Use this Route to test core package
6 |
--------------------------------------------------------------------------------
/apps/web/src/routes/__layout.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/packages/rename-tsconfig/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tsconfig",
3 | "version": "0.0.0",
4 | "private": true,
5 | "main": "index.js",
6 | "files": [
7 | "base.json",
8 | "svelte.json"
9 | ]
10 | }
--------------------------------------------------------------------------------
/apps/docs/src/routes/changelog/index.svx:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | Updates will be displayed here.
4 |
5 | ---
6 |
7 | ### 0.0.1 - xx/xx/xxxx
8 |
9 | First release.
10 |
11 | #### Added
12 |
13 | - [Link](/) an example phrase.
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /bin
4 | /turbosvelte-cli
5 | build
6 | /build
7 | .svelte-kit
8 | /.svelte-kit
9 | package
10 | /package
11 | .env
12 | .env.*
13 | !.env.example
14 | .vercel
15 | .output
16 | .turbo
17 | build/**
18 | dist/**
--------------------------------------------------------------------------------
/apps/docs/tailwind.config.cjs:
--------------------------------------------------------------------------------
1 | const config = {
2 | content: ['./src/**/*.{html,js,svelte,ts}'],
3 | darkMode: 'class',
4 | theme: {
5 | extend: {}
6 | },
7 |
8 | plugins: [require('@tailwindcss/typography')]
9 | };
10 |
11 | module.exports = config;
12 |
--------------------------------------------------------------------------------
/apps/web/src/routes/index.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 | Welcome to SvelteKit
6 | Visit kit.svelte.dev to read the documentation
7 |
8 |
--------------------------------------------------------------------------------
/turbo.json:
--------------------------------------------------------------------------------
1 | {
2 | "pipeline": {
3 | "build": {
4 | "dependsOn": ["^build"],
5 | "outputs": ["dist/**", ".build/**"]
6 | },
7 | "lint": {
8 | "outputs": []
9 | },
10 | "dev": {
11 | "cache": false
12 | },
13 | "package": {
14 | "outputs": ["package"]
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/apps/docs/src/routes/__layout.svelte:
--------------------------------------------------------------------------------
1 |
7 |
8 |
14 |
--------------------------------------------------------------------------------
/packages/rename-core/src/app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %svelte.head%
8 |
9 |
10 | %svelte.body%
11 |
12 |
13 |
--------------------------------------------------------------------------------
/apps/web/src/app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | %svelte.head%
9 |
10 |
11 | %svelte.body%
12 |
13 |
14 |
--------------------------------------------------------------------------------
/apps/docs/postcss.config.cjs:
--------------------------------------------------------------------------------
1 | const tailwindcss = require('tailwindcss');
2 | const autoprefixer = require('autoprefixer');
3 |
4 | const config = {
5 | plugins: [
6 | //Some plugins, like tailwindcss/nesting, need to run before Tailwind,
7 | tailwindcss(),
8 | //But others, like autoprefixer, need to run after,
9 | autoprefixer
10 | ]
11 | };
12 |
13 | module.exports = config;
14 |
--------------------------------------------------------------------------------
/packages/eslint-preset-rename/eslint-preset-svelteui/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "eslint-preset-rename",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "license": "MIT",
6 | "dependencies": {
7 | "eslint-config-prettier": "^8.3.0",
8 | "eslint-plugin-svelte3": "^3.2.1",
9 | "@typescript-eslint/eslint-plugin": "^5.10.1",
10 | "@typescript-eslint/parser": "^5.10.1"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/apps/docs/src/routes/changelog/__layout.svelte:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/apps/web/svelte.config.js:
--------------------------------------------------------------------------------
1 | import adapter from '@sveltejs/adapter-auto';
2 | import preprocess from 'svelte-preprocess';
3 |
4 | /** @type {import('@sveltejs/kit').Config} */
5 | const config = {
6 | // Consult https://github.com/sveltejs/svelte-preprocess
7 | // for more information about preprocessors
8 | preprocess: preprocess(),
9 |
10 | kit: {
11 | adapter: adapter(),
12 | }
13 | };
14 |
15 | export default config;
16 |
--------------------------------------------------------------------------------
/packages/rename-tsconfig/svelte.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "display": "Svelte",
4 | "extends": "./base.json",
5 | "compilerOptions": {
6 | "moduleResolution": "node",
7 | "module": "es2020",
8 | "lib": ["es2020", "DOM"],
9 | "target": "es2020",
10 | "importsNotUsedAsValues": "error",
11 | "isolatedModules": true,
12 | "resolveJsonModule": true,
13 | "sourceMap": true
14 | }
15 | }
--------------------------------------------------------------------------------
/packages/rename-core/svelte.config.js:
--------------------------------------------------------------------------------
1 | import autoprefixer from 'autoprefixer';
2 | import cssnano from 'cssnano';
3 | import preprocess from 'svelte-preprocess';
4 |
5 | /** @type {import('@sveltejs/kit').Config} */
6 | const config = {
7 | // Consult https://github.com/sveltejs/svelte-preprocess
8 | // for more information about preprocessors
9 | preprocess: preprocess({
10 | postcss: {
11 | plugins: [autoprefixer(), cssnano()]
12 | }
13 | })
14 | };
15 |
16 | export default config;
17 |
--------------------------------------------------------------------------------
/apps/web/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parser: '@typescript-eslint/parser',
4 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
5 | plugins: ['svelte3', '@typescript-eslint'],
6 | ignorePatterns: ['*.cjs'],
7 | overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
8 | settings: {
9 | 'svelte3/typescript': () => require('typescript')
10 | },
11 | parserOptions: {
12 | sourceType: 'module',
13 | ecmaVersion: 2020
14 | },
15 | env: {
16 | browser: true,
17 | es2017: true,
18 | node: true
19 | }
20 | };
21 |
--------------------------------------------------------------------------------
/apps/docs/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parser: '@typescript-eslint/parser',
4 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
5 | plugins: ['svelte3', '@typescript-eslint'],
6 | ignorePatterns: ['*.cjs'],
7 | overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
8 | settings: {
9 | 'svelte3/typescript': () => require('typescript')
10 | },
11 | parserOptions: {
12 | sourceType: 'module',
13 | ecmaVersion: 2020
14 | },
15 | env: {
16 | browser: true,
17 | es2017: true,
18 | node: true
19 | }
20 | };
21 |
--------------------------------------------------------------------------------
/packages/rename-tsconfig/base.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "display": "Default",
4 | "compilerOptions": {
5 | "composite": false,
6 | "declaration": true,
7 | "declarationMap": true,
8 | "esModuleInterop": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "inlineSources": false,
11 | "isolatedModules": true,
12 | "noUnusedLocals": false,
13 | "noUnusedParameters": false,
14 | "preserveWatchOutput": true,
15 | "skipLibCheck": true,
16 | "strict": true
17 | },
18 | "exclude": ["node_modules"]
19 | }
--------------------------------------------------------------------------------
/packages/eslint-preset-rename/eslint-preset-svelteui/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parser: '@typescript-eslint/parser',
4 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
5 | plugins: ['svelte3', '@typescript-eslint'],
6 | ignorePatterns: ['*.cjs'],
7 | overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
8 | settings: {
9 | 'svelte3/typescript': () => require('typescript'),
10 | next: {
11 | rootDir: ['packages/*/', 'docs']
12 | }
13 | },
14 | parserOptions: {
15 | sourceType: 'module',
16 | ecmaVersion: 2020
17 | },
18 | env: {
19 | browser: true,
20 | es2017: true,
21 | node: true
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/apps/docs/src/app.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | html {
6 | tab-size: 2;
7 | }
8 |
9 | /* for codeblock syntax highlighting in markdown */
10 | pre .token.tag {
11 | @apply text-indigo-400;
12 | }
13 | pre .token.attr-name {
14 | @apply text-emerald-400;
15 | }
16 | pre .token.attr-value {
17 | @apply text-emerald-200;
18 | }
19 | pre .token.namespace {
20 | @apply text-emerald-400;
21 | }
22 | pre .token.keyword,
23 | pre .token.operator {
24 | @apply text-purple-400;
25 | }
26 | pre .token.string {
27 | @apply text-emerald-300;
28 | }
29 | pre .token.function {
30 | @apply text-sky-400;
31 | }
32 | pre .token.comment {
33 | @apply text-gray-600;
34 | }
35 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-turbosvelte",
3 | "version": "1.5.5",
4 | "author": "",
5 | "description": "This is an unofficial SvelteKit monorepo starter powered by Turborepo.",
6 | "bin": "./bin/cli.cjs",
7 | "workspaces": [
8 | "apps/*",
9 | "packages/*"
10 | ],
11 | "scripts": {
12 | "build": "turbo run build",
13 | "dev": "turbo run dev --parallel",
14 | "lint": "turbo run lint"
15 | },
16 | "devDependencies": {
17 | "turbo": "latest",
18 | "prettier": "^2.4.1",
19 | "prettier-plugin-svelte": "^2.4.0"
20 | },
21 | "keywords": [
22 | "Svelte",
23 | "Component Library",
24 | "Turborepo"
25 | ],
26 | "repository": {
27 | "type": "git",
28 | "url": "https://github.com/Brisklemonade/turbosvelte.git"
29 | },
30 | "license": "MIT",
31 | "type": "module"
32 | }
33 |
--------------------------------------------------------------------------------
/packages/rename-core/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sveltekit-package-template",
3 | "version": "0.0.1",
4 | "scripts": {
5 | "dev": "svelte-kit dev",
6 | "build": "svelte-kit build",
7 | "preview": "svelte-kit preview",
8 | "check": "svelte-check --tsconfig ./tsconfig.json",
9 | "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
10 | "package": "svelte-kit package"
11 | },
12 | "devDependencies": {
13 | "@sveltejs/kit": "next",
14 | "autoprefixer": "^10.4.0",
15 | "cssnano": "^5.0.10",
16 | "postcss": "^8.3.11",
17 | "sass": "^1.43.4",
18 | "svelte": "^3.42.6",
19 | "svelte-check": "^2.2.6",
20 | "svelte-preprocess": "^4.9.4",
21 | "svelte2tsx": "^0.4.8",
22 | "tslib": "^2.3.1",
23 | "typescript": "^4.4.3"
24 | },
25 | "type": "module"
26 | }
--------------------------------------------------------------------------------
/apps/web/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "web",
3 | "version": "0.0.1",
4 | "scripts": {
5 | "dev": "svelte-kit dev",
6 | "build": "svelte-kit build",
7 | "package": "svelte-kit package",
8 | "preview": "svelte-kit preview",
9 | "check": "svelte-check --tsconfig ./tsconfig.json",
10 | "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
11 | "lint": "eslint --ignore-path .gitignore ."
12 | },
13 | "devDependencies": {
14 | "@sveltejs/adapter-auto": "next",
15 | "@sveltejs/kit": "next",
16 | "@typescript-eslint/eslint-plugin": "^4.31.1",
17 | "@typescript-eslint/parser": "^4.31.1",
18 | "eslint": "^7.32.0",
19 | "eslint-plugin-svelte3": "^3.2.1",
20 | "svelte": "^3.44.0",
21 | "svelte-check": "^2.2.6",
22 | "svelte-preprocess": "^4.9.4",
23 | "tslib": "^2.3.1",
24 | "typescript": "^4.4.3"
25 | },
26 | "type": "module"
27 | }
--------------------------------------------------------------------------------
/apps/docs/src/app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
19 | %svelte.head%
20 |
21 |
24 | %svelte.body%
25 |
26 |
27 |
--------------------------------------------------------------------------------
/apps/web/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "moduleResolution": "node",
4 | "module": "es2020",
5 | "lib": ["es2020", "DOM"],
6 | "target": "es2020",
7 | /**
8 | svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
9 | to enforce using \`import type\` instead of \`import\` for Types.
10 | */
11 | "importsNotUsedAsValues": "error",
12 | "isolatedModules": true,
13 | "resolveJsonModule": true,
14 | /**
15 | To have warnings/errors of the Svelte compiler at the correct position,
16 | enable source maps by default.
17 | */
18 | "sourceMap": true,
19 | "esModuleInterop": true,
20 | "skipLibCheck": true,
21 | "forceConsistentCasingInFileNames": true,
22 | "baseUrl": ".",
23 | "allowJs": true,
24 | "checkJs": true,
25 | "paths": {
26 | "$lib": ["src/lib"],
27 | "$lib/*": ["src/lib/*"]
28 | }
29 | },
30 | "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.svelte"]
31 | }
32 |
--------------------------------------------------------------------------------
/apps/docs/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "moduleResolution": "node",
4 | "module": "es2020",
5 | "lib": ["es2020", "DOM"],
6 | "target": "es2020",
7 | /**
8 | svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
9 | to enforce using \`import type\` instead of \`import\` for Types.
10 | */
11 | "importsNotUsedAsValues": "error",
12 | "isolatedModules": true,
13 | "resolveJsonModule": true,
14 | /**
15 | To have warnings/errors of the Svelte compiler at the correct position,
16 | enable source maps by default.
17 | */
18 | "sourceMap": true,
19 | "esModuleInterop": true,
20 | "skipLibCheck": true,
21 | "forceConsistentCasingInFileNames": true,
22 | "baseUrl": ".",
23 | "allowJs": true,
24 | "checkJs": true,
25 | "paths": {
26 | "$lib": ["src/lib"],
27 | "$lib/*": ["src/lib/*"]
28 | }
29 | },
30 | "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.svelte"]
31 | }
32 |
--------------------------------------------------------------------------------
/packages/rename-core/src/lib/Counter/Counter.svelte:
--------------------------------------------------------------------------------
1 |
9 |
10 |
19 |
20 | value--}>
21 | -
22 |
23 |
24 | {value}
25 |
26 | value++}>
27 | +
28 |
29 |
30 |
31 |
34 |
--------------------------------------------------------------------------------
/apps/web/src/routes/__error.svelte:
--------------------------------------------------------------------------------
1 |
11 |
12 |
18 |
19 |
20 | {#if status >= 500}
21 | Internal Server Error
22 | {:else}
23 | Page Not Found
24 | {/if}
25 |
26 |
27 |
28 | {#if status >= 500}
29 |
30 |
Status: {status}
31 |
Error: {error}
32 |
33 | {:else if status > 400}
34 |
35 |
Status: {status}
36 |
Error: {error}
37 |
38 | {:else}
39 |
40 |
Status: {status}
41 |
Error: {error}
42 |
43 | {/if}
44 |
--------------------------------------------------------------------------------
/packages/rename-core/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "moduleResolution": "node",
4 | "module": "es2020",
5 | "lib": ["es2020", "DOM"],
6 | "target": "es2020",
7 | /**
8 | svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
9 | to enforce using \`import type\` instead of \`import\` for Types.
10 | */
11 | "importsNotUsedAsValues": "error",
12 | "isolatedModules": true,
13 | "resolveJsonModule": true,
14 | /**
15 | To have warnings/errors of the Svelte compiler at the correct position,
16 | enable source maps by default.
17 | */
18 | "sourceMap": true,
19 | "esModuleInterop": true,
20 | "skipLibCheck": true,
21 | "forceConsistentCasingInFileNames": true,
22 | "baseUrl": ".",
23 | "allowJs": true,
24 | "checkJs": true,
25 | "paths": {
26 | "$lib": ["src/lib"],
27 | "$lib/*": ["src/lib/*"]
28 | }
29 | },
30 | "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.svelte"]
31 | }
32 |
--------------------------------------------------------------------------------
/apps/docs/svelte.config.js:
--------------------------------------------------------------------------------
1 | import { mdsvex } from 'mdsvex';
2 | import path from 'path';
3 | import vercel from '@sveltejs/adapter-vercel';
4 | import preprocess from 'svelte-preprocess';
5 | import slug from 'rehype-slug';
6 |
7 | /** @type {import('@sveltejs/kit').Config} */
8 | const config = {
9 | extensions: ['.svelte', '.md', '.svx'],
10 |
11 | // Consult https://github.com/sveltejs/svelte-preprocess
12 | // for more information about preprocessors
13 | preprocess: [
14 | preprocess({
15 | postcss: true
16 | }),
17 | mdsvex({
18 | extensions: ['.svx', '.md'],
19 | rehypePlugins: [slug]
20 | })
21 | ],
22 |
23 | kit: {
24 | adapter: vercel(),
25 |
26 | package: {
27 | exports: (file) => file === 'index.js'
28 | },
29 | vite: {
30 | resolve: {
31 | alias: {
32 | $components: path.resolve('./src/components')
33 | }
34 | },
35 | server: {
36 | fs: {
37 | allow: ['.']
38 | }
39 | }
40 | }
41 | }
42 | };
43 |
44 | export default config;
45 |
--------------------------------------------------------------------------------
/apps/docs/src/routes/docs/button.svx:
--------------------------------------------------------------------------------
1 |
10 |
11 | # Button
12 |
13 | The button component can be used to launch an action but also to link to other pages.
14 |
15 |
16 | clicked = true}
19 | >
20 | Click Me
21 |
22 | I am {clicked ? 'clicked' : 'not clicked'}
23 |
24 |
25 | ## Basic Example
26 |
27 | ```html
28 |
35 |
36 |
37 | Increment
38 |
39 | ```
40 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Kamell
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/apps/docs/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Kamell
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/apps/docs/src/routes/docs/index.svx:
--------------------------------------------------------------------------------
1 | # Home
2 |
3 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas minus, voluptatum unde libero maxime sint corrupti itaque est non! Eos.
4 |
5 | ## Installation
6 |
7 | Run on of these commands
8 |
9 | ```bash
10 | npm install package -D
11 | # or
12 | yarn add package -D
13 | # or
14 | pnpm add package -D
15 | ```
16 |
17 | ## Code Block
18 |
19 | Open any `.svelte` file and import what components you would like to use.
20 | All available components are linked on the left side navigation.
21 |
22 | ```html
23 |
30 |
31 |
32 | Increment
33 |
34 | ```
35 |
36 | ## Other
37 |
38 | #### Thing 1
39 |
40 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas minus, voluptatum unde libero maxime sint corrupti itaque est non! Eos.
41 |
42 | #### Thing 2
43 |
44 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas minus, voluptatum unde libero maxime sint corrupti itaque est non! Eos.
45 |
46 | #### Thing 3
47 |
48 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas minus, voluptatum unde libero maxime sint corrupti itaque est non! Eos.
49 |
--------------------------------------------------------------------------------
/packages/rename-core/src/lib/Counter/Counter.scss:
--------------------------------------------------------------------------------
1 | @import url('https://rsms.me/inter/inter.css');
2 |
3 | .counter {
4 | display: inline-flex;
5 | align-items: center;
6 | justify-content: space-between;
7 | padding: 4px;
8 | border-radius: 4px;
9 | color: #ff3e00;
10 | background-color: #f6fafd;
11 | border: 1px solid #dae2e7;
12 | border-bottom-color: hsl(205, 22%, 68%);
13 | font: {
14 | family: "Inter", sans-serif;
15 | weight: 600;
16 | size: 16px;
17 | }
18 | span {
19 | border-left: 1px solid #dae2e7;
20 | border-right: 1px solid #dae2e7;
21 | padding: 0 12px;
22 | margin: 0 4px;
23 | }
24 | button {
25 | width: 32px;
26 | height: 32px;
27 | display: flex;
28 | align-items: center;
29 | justify-content: center;
30 | border-radius: 4px;
31 | background-color: transparent;
32 | transition: 150ms ease all;
33 | color: #444;
34 | font: inherit;
35 | cursor: pointer;
36 | border: none;
37 | outline: none;
38 | &:hover {
39 | background-color: #e6f1f9;
40 | }
41 | &:focus {
42 | box-shadow: 0 0 0 3px rgba(255, 62, 0, 0.25);
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/apps/docs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-sveleton",
3 | "version": "1.0.0",
4 | "description": "A skeleton documentation site powered by MdSvex & Svelte!",
5 | "repository": {
6 | "type": "git",
7 | "url": "https://github.com/Brisklemonade/sveleton.git"
8 | },
9 | "author": "",
10 | "license": "MIT",
11 | "scripts": {
12 | "dev": "svelte-kit dev",
13 | "build": "svelte-kit build",
14 | "package": "svelte-kit package",
15 | "preview": "svelte-kit preview",
16 | "check": "svelte-check --tsconfig ./tsconfig.json",
17 | "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
18 | "lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
19 | "format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. ."
20 | },
21 | "devDependencies": {
22 | "@sveltejs/adapter-vercel": "next",
23 | "@sveltejs/kit": "next",
24 | "@tailwindcss/typography": "^0.5.0",
25 | "@typescript-eslint/eslint-plugin": "^5.10.1",
26 | "@typescript-eslint/parser": "^5.10.1",
27 | "autoprefixer": "^10.4.2",
28 | "eslint": "^7.32.0",
29 | "eslint-config-prettier": "^8.3.0",
30 | "eslint-plugin-svelte3": "^3.2.1",
31 | "mdsvex": "^0.9.8",
32 | "postcss": "^8.4.5",
33 | "postcss-load-config": "^3.1.1",
34 | "prettier": "^2.4.1",
35 | "prettier-plugin-svelte": "^2.4.0",
36 | "rehype-slug": "^5.0.0",
37 | "svelte": "^3.44.0",
38 | "svelte-check": "^2.2.6",
39 | "svelte-preprocess": "^4.10.1",
40 | "svelte2tsx": "^0.4.12",
41 | "tailwindcss": "^3.0.12",
42 | "tslib": "^2.3.1",
43 | "typescript": "^4.4.3"
44 | },
45 | "type": "module"
46 | }
47 |
--------------------------------------------------------------------------------
/apps/docs/src/routes/index.svelte:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 | Big Title in an h1 element
20 |
21 | Smaller subtitle in a h2 element
22 |
23 |
Get Started
24 |
25 | npm install title -D
26 | {#if copiedText}
27 | (copied)
28 | {/if}
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/apps/docs/src/routes/docs/markdown.svx:
--------------------------------------------------------------------------------
1 | # Category
2 |
3 | ## Markdown Cheatsheet
4 |
5 | ### Basic Syntax
6 |
7 | | Element | Markdown Syntax |
8 | | --------------- | ---------------------------------------------------- |
9 | | Heading | # H1 ## H2 ### H3 |
10 | | Bold | **bold text** |
11 | | Italic | _italicized text_ |
12 | | Blockquote | > blockquote |
13 | | Ordered List | 1. First item 2. Second item 3. Third item |
14 | | Unordered List | - First item - Second item - Third item |
15 | | Code | `code` |
16 | | Horizontal Rule | --- |
17 | | Link | [title](https://www.example.com) |
18 | | Image |  |
19 |
20 | ### Extended Syntax
21 |
22 | **Table**
23 |
24 | | Syntax | Description |
25 | | --------- | ----------- |
26 | | Header | Title |
27 | | Paragraph | Text |
28 |
29 | ## Other
30 |
31 | #### Thing 4
32 |
33 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas minus, voluptatum unde libero maxime sint corrupti itaque est non! Eos.
34 |
35 | #### Thing 5
36 |
37 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas minus, voluptatum unde libero maxime sint corrupti itaque est non! Eos.
38 |
39 | #### Thing 6
40 |
41 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas minus, voluptatum unde libero maxime sint corrupti itaque est non! Eos.
42 |
--------------------------------------------------------------------------------
/apps/docs/src/routes/docs/__layout.svelte:
--------------------------------------------------------------------------------
1 |
38 |
39 |
42 |
43 | {#each pages as { title, links }}
44 | {#if title}
45 |
48 | {title}
49 |
50 | {/if}
51 |
52 | {#each links as { href, text }}
53 |
54 |
62 | {text}
63 |
64 |
65 | {/each}
66 |
67 | {/each}
68 |
69 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/apps/docs/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
25 |
26 | (back to top )
27 |
28 |
29 |
30 |
31 |
32 | ## Contributing
33 |
34 | Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
35 |
36 | If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
37 | Don't forget to give the project a star! Thanks again!
38 |
39 | 1. Fork the Project
40 | 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
41 | 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
42 | 4. Push to the Branch (`git push origin feature/AmazingFeature`)
43 | 5. Open a Pull Request
44 |
45 | (back to top )
46 |
47 |
48 |
49 | ## License
50 |
51 | Distributed under the MIT License
52 |
53 | (back to top )
54 |
55 |
56 |
57 | ## Contact
58 |
59 | Twitter - [yournamehere](https://example.com)
60 |
61 | (back to top )
62 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
Turborepo SvelteKit System starter
3 | This is an unofficial SvelteKit monorepo starter powered by Turborepo.
4 |
5 |
6 | # What's inside?
7 |
8 | This Turborepo includes the following packages and apps:
9 |
10 | ### Apps and Packages
11 |
12 | - `docs`: [Sveleton](https://github.com/Brisklemonade/sveleton) placeholder documentation site
13 | - `rename-core`: core components
14 | - `rename-tsconfig`: shared `tsconfig.json`s used throughout the monorepo
15 | - `eslint-preset-rename`: ESLint preset
16 |
17 | Each package and app is 100% [Typescript](https://www.typescriptlang.org/).
18 |
19 | # Installation
20 |
21 | Run the following command:
22 |
23 | ```bash
24 | npx create-turbosvelte app-name
25 | ```
26 |
27 | # Project Configuration
28 |
29 | ### **Modify the root `package.json`**
30 |
31 | Make sure to modify the contents in the project's root package json to fit your needs.
32 |
33 | ### **Running concurrent dev enviornments**
34 |
35 | As of now if you want to run multiple dev enviornments in parallel, you will have to define different ports in your scripts.
36 |
37 | So you will have to change each `package.json` like such:
38 |
39 | ```bash
40 | "scripts": {
41 | "dev": "svelte-kit dev -p 3200",
42 | "build": "svelte-kit build",
43 | "preview": "svelte-kit preview",
44 | "check": "svelte-check --tsconfig ./tsconfig.json",
45 | "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
46 | "package": "svelte-kit package"
47 | },
48 | ```
49 |
50 | Each project's port will need to be different.
51 |
52 | ### **Changing the NPM organization scope**
53 |
54 | The NPM organization scope for this design system starter is `@rename`. To change this, it's a bit manual at the moment, but you'll need to do the following:
55 |
56 | - Rename folders in `packages/*` to replace `rename` with your desired scope
57 | - Search and replace `rename` with your desired scope
58 | - Re-run `npm install`
59 |
60 | # Contributing
61 |
62 | Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
63 |
64 | # License
65 |
66 | [MIT](https://choosealicense.com/licenses/mit/)
67 |
--------------------------------------------------------------------------------
/apps/docs/src/lib/PageComponents/Navbar.svelte:
--------------------------------------------------------------------------------
1 |
18 |
19 |
57 |
--------------------------------------------------------------------------------
/packages/rename-core/README.md:
--------------------------------------------------------------------------------
1 | # Rename core
2 |
3 | A barebones project that provides the essentials for writing highly-optimized, reusable packages in Svelte using SvelteKit's [`package`](https://kit.svelte.dev/docs#packaging) feature.
4 |
5 | All styles are component-scoped and preprocessed into minified and prefixed CSS during packaging using [cssnano](https://cssnano.co/) and [autoprefixer](https://github.com/postcss/autoprefixer). TypeScript type definitions are generated automatically from your components using [svelte2tsx](https://github.com/sveltejs/language-tools/tree/master/packages/svelte2tsx).
6 |
7 | ## Packaging and Publishing
8 |
9 | ### Packaging
10 |
11 | To package your components, simply run the package command:
12 |
13 | ```bash
14 | npm run package
15 | ```
16 |
17 | This will preprocess the contents of [`src/lib`](/src/lib) into a `package` folder at the root of your project.
18 |
19 | ### Publishing to NPM
20 |
21 | After you have generated the `package` folder, run `npm publish ./package` to publish your library to NPM.
22 |
23 | Be sure to properly configure `package.json` with the correct data before publishing.
24 |
25 | ## Setting up Documentation
26 |
27 | Most components will need documentation in some form. This template doesn't have any opinions on how documentation should be handled, however it does provide you with SvelteKit's `routes` folder which can be used for this. Below are some very useful svelte-focused tools that can make your life considerably easier when documenting components:
28 |
29 | - [vite-plugin-svled](https://github.com/mattjennings/vite-plugin-sveld) is a vite port of [sveld](https://github.com/carbon-design-system/sveld/), which allows you to automatically generate API documentation for your svelte components using typescript types and JSDoc comments.
30 | - [mdsvex](https://mdsvex.pngwn.io/) is a superset of markdown that allows the usage of Svelte components and interactive logic. Since mdsvex preprocesses your markdown files into Svelte components, it can also be used as SvelteKit routes.
31 | - [mdsvex-sveld](https://github.com/mattjennings/mdsvex-sveld) is an mdsvex plugin that automatically outputs markdown tables for component API documentation using [sveld](https://github.com/carbon-design-system/sveld/).
32 |
33 | ## Setting up Theming
34 |
35 | If you plan to develop a large amount of components, it may become necessary to have people import a theme stylesheet containing variables. This can be done by creating a `theme.css` file in [`src/lib`](/src/lib) and having people import it from `node_modules`.
36 |
37 | Developers using your library could import the theme file like so:
38 |
39 | ```html
40 |
44 |
45 |
46 | ```
47 |
48 | Many modern bundlers support importing CSS as ES Modules. This is likely to be the best way of importing theme files, as they can be easily resolved from `node_modules`. Alternatively, you can use @import syntax with the postcss-import plugin or sass in your \