Skip to content

Commit 2b0fb19

Browse files
author
Dominik Zogg
committed
initial commit
0 parents  commit 2b0fb19

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+7241
-0
lines changed

.env.development

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_PETSTORE_URL=https://localhost

.env.production

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_PETSTORE_URL=https://petstore.production

.env.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_PETSTORE_URL=https://petstore.test

.eslintrc.cjs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es2020": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended",
9+
"plugin:solid/recommended",
10+
"plugin:solid/typescript",
11+
],
12+
"overrides": [
13+
{
14+
"env": {
15+
"node": true
16+
},
17+
"files": [
18+
".eslintrc.{js,cjs}"
19+
],
20+
"parserOptions": {
21+
"sourceType": "script"
22+
}
23+
}
24+
],
25+
"parser": "@typescript-eslint/parser",
26+
"parserOptions": {
27+
"ecmaVersion": "latest",
28+
"sourceType": "module"
29+
},
30+
"plugins": [
31+
"@typescript-eslint",
32+
"solid"
33+
],
34+
"rules": {
35+
}
36+
};

.github/workflows/ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches:
7+
- master
8+
schedule:
9+
- cron: '0 0 * * *'
10+
11+
jobs:
12+
node16:
13+
name: Node 16
14+
runs-on: ubuntu-22.04
15+
steps:
16+
- name: checkout
17+
uses: actions/checkout@v4
18+
- name: checkout node
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '16'
22+
- run: npm install -g pnpm@latest
23+
- run: pnpm install
24+
- run: pnpm run build
25+
- run: TZ=Europe/Zurich pnpm test -- --coverage
26+
node18:
27+
name: Node 18
28+
runs-on: ubuntu-22.04
29+
steps:
30+
- name: checkout
31+
uses: actions/checkout@v4
32+
- name: checkout node
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: '18'
36+
- run: npm install -g pnpm@latest
37+
- run: pnpm install
38+
- run: pnpm run build
39+
- run: TZ=Europe/Zurich pnpm test -- --coverage
40+
node20:
41+
name: Node 20
42+
runs-on: ubuntu-22.04
43+
steps:
44+
- name: checkout
45+
uses: actions/checkout@v4
46+
- name: checkout node
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version: '20'
50+
- run: npm install -g pnpm@latest
51+
- run: pnpm install
52+
- run: pnpm run build
53+
- run: TZ=Europe/Zurich pnpm test -- --coverage
54+
- name: coveralls.io
55+
uses: coverallsapp/github-action@master
56+
with:
57+
github-token: ${{ secrets.GITHUB_TOKEN }}
58+
- name: sonarcloud.io
59+
uses: sonarsource/sonarcloud-github-action@master
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
26+
coverage

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# solid-petstore
2+
3+
[![CI](https://github.com/chubbyts/solid-petstore/workflows/CI/badge.svg?branch=master)](https://github.com/chubbyts/solid-petstore/actions?query=workflow%3ACI)
4+
[![Coverage Status](https://coveralls.io/repos/github/chubbyts/solid-petstore/badge.svg?branch=master)](https://coveralls.io/github/chubbyts/solid-petstore?branch=master)
5+
6+
[![bugs](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_solid-petstore&metric=bugs)](https://sonarcloud.io/dashboard?id=chubbyts_solid-petstore)
7+
[![code_smells](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_solid-petstore&metric=code_smells)](https://sonarcloud.io/dashboard?id=chubbyts_solid-petstore)
8+
[![coverage](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_solid-petstore&metric=coverage)](https://sonarcloud.io/dashboard?id=chubbyts_solid-petstore)
9+
[![duplicated_lines_density](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_solid-petstore&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=chubbyts_solid-petstore)
10+
[![ncloc](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_solid-petstore&metric=ncloc)](https://sonarcloud.io/dashboard?id=chubbyts_solid-petstore)
11+
[![sqale_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_solid-petstore&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=chubbyts_solid-petstore)
12+
[![alert_status](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_solid-petstore&metric=alert_status)](https://sonarcloud.io/dashboard?id=chubbyts_solid-petstore)
13+
[![reliability_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_solid-petstore&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=chubbyts_solid-petstore)
14+
[![security_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_solid-petstore&metric=security_rating)](https://sonarcloud.io/dashboard?id=chubbyts_solid-petstore)
15+
[![sqale_index](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_solid-petstore&metric=sqale_index)](https://sonarcloud.io/dashboard?id=chubbyts_solid-petstore)
16+
[![vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_solid-petstore&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=chubbyts_solid-petstore)
17+
18+
## Description
19+
20+
This is a solidjs frontend for the petstore skeleton.
21+
22+
## Scripts
23+
24+
### Compiles and hot-reloads for development
25+
```
26+
pnpm start
27+
```
28+
29+
### Compiles and minifies for production
30+
```
31+
pnpm build
32+
```
33+
34+
### Run your unit tests
35+
```
36+
pnpm test
37+
```
38+
39+
## Copyright
40+
41+
2024 Dominik Zogg

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + Solid + TS</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/index.tsx"></script>
12+
</body>
13+
</html>

package.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"name": "solid-petstore",
3+
"type": "module",
4+
"version": "1.0.0",
5+
"description": "A skeleton solidjs app for the petstore api.",
6+
"keywords": [
7+
"chubbyts",
8+
"skleton",
9+
"solid"
10+
],
11+
"author": "Dominik Zogg",
12+
"license": "MIT",
13+
"repository": "chubbyts/solid-petstore",
14+
"scripts": {
15+
"build": "tsc && vite build",
16+
"cs-fix": "prettier --write src tests",
17+
"cs": "prettier --check src tests",
18+
"develop": "vite",
19+
"lint-fix": "eslint src tests --fix",
20+
"lint": "eslint src tests",
21+
"start": "pnpm i && pnpm cs-fix && pnpm develop",
22+
"test": "vitest"
23+
},
24+
"dependencies": {
25+
"@chubbyts/chubbyts-throwable-to-error": "^1.2.1",
26+
"@solidjs/router": "^0.12.4",
27+
"autoprefixer": "^10.4.17",
28+
"date-fns": "^3.3.1",
29+
"i": "^0.3.7",
30+
"postcss": "^8.4.35",
31+
"qs": "^6.11.2",
32+
"solid-js": "^1.8.15",
33+
"tailwindcss": "^3.4.1",
34+
"zod": "^3.22.4"
35+
},
36+
"devDependencies": {
37+
"@solidjs/testing-library": "^0.8.6",
38+
"@testing-library/jest-dom": "^6.4.2",
39+
"@testing-library/user-event": "^14.5.2",
40+
"@types/node": "^20.11.20",
41+
"@types/prettier": "^2.7.3",
42+
"@types/qs": "^6.9.12",
43+
"@typescript-eslint/eslint-plugin": "^7.1.0",
44+
"@typescript-eslint/parser": "^7.1.0",
45+
"@vitest/coverage-v8": "^1.3.1",
46+
"cross-fetch": "^4.0.0",
47+
"eslint": "^8.57.0",
48+
"eslint-plugin-solid": "^0.13.1",
49+
"fetch-mock": "^9.11.0",
50+
"jsdom": "^24.0.0",
51+
"prettier": "^2.8.8",
52+
"typescript": "^5.2.2",
53+
"vite": "^5.1.4",
54+
"vite-plugin-solid": "^2.10.1",
55+
"vitest": "^1.3.1"
56+
},
57+
"engines": {
58+
"node": ">=16"
59+
},
60+
"prettier": {
61+
"printWidth": 120,
62+
"tabWidth": 2,
63+
"singleQuote": true,
64+
"trailingComma": "all"
65+
}
66+
}

0 commit comments

Comments
 (0)