Skip to content

Commit 3629cc5

Browse files
committed
ci: 🐝 initial commit
0 parents  commit 3629cc5

24 files changed

+2898
-0
lines changed

.cz.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"commitizen": {
3+
"name": "cz_conventional_commits",
4+
"version": "0.0.1",
5+
"tag_format": "$version"
6+
}
7+
}

.env.EXAMPLE

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_MAPBOX_ACCESS_TOKEN="your.mapbox.access.token"

.eslintrc.cjs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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: 2019,
14+
},
15+
env: {
16+
browser: true,
17+
es2017: true,
18+
node: true,
19+
},
20+
};

.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SvelteKit Files
2+
build/
3+
functions/
4+
/.svelte-kit
5+
6+
# Dependency directories
7+
node_modules/
8+
/package
9+
10+
# Optional eslint cache
11+
.eslintcache
12+
13+
# dotenv environment variable files
14+
.env*
15+
!.env.EXAMPLE
16+
17+
# Mac files
18+
.DS_Store
19+
20+
# Local Netlify folder
21+
.netlify

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit "$1"

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
pnpm run prettier:check

.husky/pre-push

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx svelte-check --fail-on-hints

.pre-commit-config.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- hooks:
3+
- id: commitizen
4+
stages:
5+
- commit-msg
6+
repo: https://github.com/commitizen-tools/commitizen
7+
rev: v2.17.10

.prettierignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.svelte-kit/**
2+
static/**
3+
build/**
4+
functions/**
5+
package/**
6+
node_modules/**
7+
pnpm-lock.yaml

.prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"useTabs": false,
3+
"arrowParens": "always",
4+
"singleQuote": true,
5+
"trailingComma": "all",
6+
"printWidth": 100
7+
}

.vscode/settings.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.organizeImports": true
4+
},
5+
"editor.formatOnSave": true,
6+
"[svelte]": {
7+
"editor.defaultFormatter": "svelte.svelte-vscode"
8+
},
9+
"spellright.language": ["en-GB"]
10+
}

README.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# create-svelte
2+
3+
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte);
4+
5+
## Creating a project
6+
7+
If you're seeing this, you've probably already done this step. Congrats!
8+
9+
```bash
10+
# create a new project in the current directory
11+
npm init svelte@next
12+
13+
# create a new project in my-app
14+
npm init svelte@next my-app
15+
```
16+
17+
> Note: the `@next` is temporary
18+
19+
## Developing
20+
21+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
22+
23+
```bash
24+
npm run dev
25+
26+
# or start the server and open the app in a new browser tab
27+
npm run dev -- --open
28+
```
29+
30+
## Building
31+
32+
Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then:
33+
34+
```bash
35+
npm run build
36+
```
37+
38+
> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.

commitlint.config.cjs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// eslint-disable-next-line @typescript-eslint/no-var-requires
2+
const defaultConfig = require('@commitlint/config-conventional');
3+
4+
module.exports = {
5+
extends: ['@commitlint/config-conventional'],
6+
};

package.json

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "@rodneylab/components",
3+
"description": "Handy components for building sites in SvelteKit",
4+
"version": "0.0.1",
5+
"author": "Rodney Lab <[email protected]> (@rodneyLab)",
6+
"license": "BSD-3-Clause",
7+
"keywords": [
8+
"svelte",
9+
"sveltekit",
10+
"map",
11+
"mapbox",
12+
"openstreetmap"
13+
],
14+
"svelte": "src/index.js",
15+
"scripts": {
16+
"dev": "svelte-kit dev -p 3000",
17+
"build": "svelte-kit build",
18+
"preview": "svelte-kit preview -p 3000",
19+
"check": "svelte-check --tsconfig ./tsconfig.json",
20+
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
21+
"format": "prettier --write --plugin-search-dir=. .",
22+
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
23+
"prepare": "husky install",
24+
"prettier:check": "prettier --check --plugin-search-dir=. ."
25+
},
26+
"devDependencies": {
27+
"@commitlint/cli": "^13.2.0",
28+
"@commitlint/config-conventional": "^13.2.0",
29+
"@sveltejs/kit": "next",
30+
"@types/leaflet": "^1.7.5",
31+
"@typescript-eslint/eslint-plugin": "^4.31.1",
32+
"@typescript-eslint/parser": "^4.31.1",
33+
"dotenv": "^10.0.0",
34+
"eslint": "^7.32.0",
35+
"eslint-config-prettier": "^8.3.0",
36+
"eslint-plugin-svelte3": "^3.2.1",
37+
"husky": "^7.0.0",
38+
"leaflet": "^1.7.1",
39+
"prettier": "^2.4.1",
40+
"prettier-plugin-svelte": "^2.4.0",
41+
"svelte": "^3.42.6",
42+
"svelte-check": "^2.2.6",
43+
"svelte-preprocess": "^4.9.4",
44+
"svelte2tsx": "^0.4.7",
45+
"tslib": "^2.3.1",
46+
"typescript": "^4.4.3"
47+
},
48+
"type": "module"
49+
}

0 commit comments

Comments
 (0)