Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikzogg committed Mar 18, 2024
0 parents commit 7692bb5
Show file tree
Hide file tree
Showing 59 changed files with 10,686 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_PETSTORE_URL=https://localhost
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_PETSTORE_URL=https://petstore.production
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_PETSTORE_URL=https://petstore.test
55 changes: 55 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
module.exports = {
env: {
browser: true,
es2020: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:tailwindcss/recommended',
],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'linebreak-style': ['error', 'unix'],
'no-constant-condition': ['error', { checkLoops: false }],
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['error', 'always'],
'@typescript-eslint/consistent-type-imports': 'error',
'no-param-reassign': 'error',
'no-var': 'error',
'prefer-const': 'error',
},
settings: {
'import/resolver': {
node: {
extensions: ['.cjs', '.d.ts', '.js', '.jsx', '.mjs', '.ts', '.tsx'],
},
},
},
};
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on:
push:
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * *'

jobs:
node16:
name: Node 16
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: checkout node
uses: actions/setup-node@v4
with:
node-version: '16'
- run: npm install -g pnpm@latest
- run: pnpm install
- run: pnpm run build
- run: TZ=Europe/Zurich pnpm test -- --coverage
node18:
name: Node 18
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: checkout node
uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm install -g pnpm@latest
- run: pnpm install
- run: pnpm run build
- run: TZ=Europe/Zurich pnpm test -- --coverage
node20:
name: Node 20
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: checkout node
uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm install -g pnpm@latest
- run: pnpm install
- run: pnpm run build
- run: TZ=Europe/Zurich pnpm test -- --coverage
- name: coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: sonarcloud.io
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

coverage
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2024 Dominik Zogg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# vue-petstore

[![CI](https://github.com/chubbyts/vue-petstore/actions/workflows/ci.yml/badge.svg)](https://github.com/chubbyts/vue-petstore/actions/workflows/ci.yml)
[![Coverage Status](https://coveralls.io/repos/github/chubbyts/vue-petstore/badge.svg?branch=master)](https://coveralls.io/github/chubbyts/vue-petstore?branch=master)

[![bugs](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_vue-petstore&metric=bugs)](https://sonarcloud.io/dashboard?id=chubbyts_vue-petstore)
[![code_smells](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_vue-petstore&metric=code_smells)](https://sonarcloud.io/dashboard?id=chubbyts_vue-petstore)
[![coverage](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_vue-petstore&metric=coverage)](https://sonarcloud.io/dashboard?id=chubbyts_vue-petstore)
[![duplicated_lines_density](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_vue-petstore&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=chubbyts_vue-petstore)
[![ncloc](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_vue-petstore&metric=ncloc)](https://sonarcloud.io/dashboard?id=chubbyts_vue-petstore)
[![sqale_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_vue-petstore&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=chubbyts_vue-petstore)
[![alert_status](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_vue-petstore&metric=alert_status)](https://sonarcloud.io/dashboard?id=chubbyts_vue-petstore)
[![reliability_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_vue-petstore&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=chubbyts_vue-petstore)
[![security_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_vue-petstore&metric=security_rating)](https://sonarcloud.io/dashboard?id=chubbyts_vue-petstore)
[![sqale_index](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_vue-petstore&metric=sqale_index)](https://sonarcloud.io/dashboard?id=chubbyts_vue-petstore)
[![vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_vue-petstore&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=chubbyts_vue-petstore)

## Description

This is a vuejs frontend for the petstore skeleton.

## Scripts

### Compiles and hot-reloads for development
```
pnpm start
```

### Compiles and minifies for production
```
pnpm build
```

### Run your unit tests
```
pnpm test
```

## Copyright

2024 Dominik Zogg
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Petstore</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>

</html>
69 changes: 69 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"name": "vuw-petstore",
"type": "module",
"version": "1.0.0",
"description": "A skeleton vuejs app for the petstore api.",
"keywords": [
"chubbyts",
"skleton",
"vue"
],
"author": "Dominik Zogg",
"license": "MIT",
"repository": "chubbyts/vue-petstore",
"scripts": {
"build": "vue-tsc && vite build",
"cs-fix": "prettier --write src *.cjs *.js *.ts",
"cs": "prettier --check src *.cjs *.js *.ts",
"develop": "vite",
"lint-fix": "eslint src *.cjs *.js *.ts --fix",
"lint": "eslint src *.cjs *.js *.ts",
"start": "pnpm i && pnpm cs-fix && pnpm develop",
"test": "vitest"
},
"dependencies": {
"@chubbyts/chubbyts-throwable-to-error": "^1.2.1",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"autoprefixer": "^10.4.18",
"cross-fetch": "^4.0.0",
"date-fns": "^3.3.1",
"postcss": "^8.4.35",
"qs": "^6.12.0",
"tailwindcss": "^3.4.1",
"vue": "^3.4.21",
"vue-router": "^4.3.0",
"zod": "^3.22.4"
},
"devDependencies": {
"@chubbyts/chubbyts-function-mock": "^1.4.1",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/user-event": "^14.5.2",
"@testing-library/vue": "^8.0.2",
"@types/node": "^20.11.25",
"@types/prettier": "^2.7.3",
"@types/qs": "^6.9.12",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"@vitejs/plugin-vue": "^5.0.4",
"@vitest/coverage-v8": "^1.3.1",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-tailwindcss": "^3.14.3",
"eslint-plugin-vue": "^9.23.0",
"jsdom": "^24.0.0",
"prettier": "^2.8.8",
"typescript": "^5.4.2",
"vite": "^5.1.5",
"vitest": "^1.3.1",
"vue-tsc": "^1.8.27"
},
"engines": {
"node": ">=16"
},
"prettier": {
"printWidth": 120,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all"
}
}
Loading

0 comments on commit 7692bb5

Please sign in to comment.