Skip to content

Commit 831d6dc

Browse files
author
Demetrey Iljin
committed
Initial Commit
1 parent 23d4d27 commit 831d6dc

Some content is hidden

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

80 files changed

+10480
-2
lines changed

.eslintrc.cjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* eslint-env node */
2+
require("@rushstack/eslint-patch/modern-module-resolution");
3+
4+
module.exports = {
5+
root: true,
6+
extends: [
7+
"plugin:vue/vue3-essential",
8+
"eslint:recommended",
9+
"@vue/eslint-config-typescript",
10+
"@vue/eslint-config-prettier",
11+
],
12+
overrides: [
13+
{
14+
files: ["cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}"],
15+
extends: ["plugin:cypress/recommended"],
16+
},
17+
],
18+
parserOptions: {
19+
ecmaVersion: "latest",
20+
},
21+
};

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
.DS_Store
12+
dist
13+
dist-ssr
14+
coverage
15+
*.local
16+
17+
/cypress/videos/
18+
/cypress/screenshots/
19+
20+
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
23+
.idea
24+
*.suo
25+
*.ntvs*
26+
*.njsproj
27+
*.sln
28+
*.sw?
29+
30+
# Custom Files
31+
2Do.txt

.prettierrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"printWidth": 120
3+
}

.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"Vue.volar",
4+
"Vue.vscode-typescript-vue-plugin",
5+
"esbenp.prettier-vscode",
6+
"dbaeumer.vscode-eslint"
7+
]
8+
}

README.md

Lines changed: 123 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,123 @@
1-
# dim-vue3-template
2-
Vue 3 + Vite Starter
1+
# Vue 3 Starter
2+
3+
- [Vue 3](https://vuejs.org/) + [Vite](https://vitejs.dev/) Minimalistic Starter Template
4+
- Uses [TypeScript](https://www.typescriptlang.org/) and [Script Setup SFC](https://vuejs.org/api/sfc-script-setup.html)
5+
<br/><br/>
6+
7+
## Features
8+
9+
- Full configured and ready
10+
- No complex || heavy dependencies
11+
- Atomic Design Patter
12+
- Pre-configured HTML index page (including SEO-metatags and No-Script section)
13+
- Prepared public folder (icons, robots.txt, htaccess, humans.txt, etc)
14+
- CSS normalization
15+
- SCSS Maps and Modules in global scope
16+
- Configured router (including transitions, navigation guards and 404 page)
17+
- Simple code examples for Storage, Composables, TypeScript, Modules
18+
- ESLint + Prettier for better code quality
19+
- Cypress + Vitest for testing
20+
<br/><br/>
21+
22+
## Preview
23+
24+
[Live Demo](http://vue3-template.demetrey.ru/)
25+
<br/>
26+
<br/>
27+
![image](/public/cover.jpg)
28+
29+
<br/><br/>
30+
31+
## Requirements
32+
33+
- [Node.js](https://nodejs.org/en/): >= 16.11.0
34+
- [npm](https://www.npmjs.com/): >= 6.32.4
35+
<br/><br/>
36+
37+
## Recommended IDE
38+
39+
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
40+
<br/><br/>
41+
42+
## Installed Modules
43+
44+
- [Pinia](https://pinia.vuejs.org/) &rarr; Storage
45+
- [Axios](https://axios-http.com/) &rarr; Promise based HTTP client
46+
- [VueUse](https://vueuse.org/) &rarr; Best Collection of Vue Composition Utilities
47+
- [SASS](https://sass-lang.com/) &rarr; CSS Preprocessor
48+
- [ESLint](https://eslint.org/) + [Prettier](https://prettier.io/) &rarr; linting and code formatting
49+
- [Cypress](https://www.cypress.io/) &rarr; End-to-End (e2e) testing framework
50+
- [Vitest](https://vitest.dev/) &rarr; Unit testing framework
51+
<br/><br/>
52+
53+
## Scripts
54+
55+
### Clone repo
56+
57+
```bash
58+
git clone https://github.com/Demetory/dim-vue3-template
59+
```
60+
61+
### Install and update dependencies
62+
63+
```bash
64+
npm install
65+
```
66+
67+
Update deps if needed
68+
69+
```bash
70+
npm update
71+
```
72+
73+
### Development
74+
75+
Start the development server on http://localhost:5173
76+
77+
```bash
78+
npm run dev
79+
```
80+
81+
### Build for Production
82+
83+
Build with type-check:
84+
85+
```bash
86+
npm run build
87+
```
88+
89+
or just for build only
90+
91+
```bash
92+
npm run build-only
93+
```
94+
95+
### Linting
96+
97+
```bash
98+
npm run lint
99+
```
100+
101+
```bash
102+
npm run type-check
103+
```
104+
105+
### Testing
106+
107+
Vitest unit testing
108+
109+
```bash
110+
npm run test:unit
111+
```
112+
113+
Cypress e2e-testing
114+
115+
```bash
116+
npm run test:e2e
117+
```
118+
119+
<br/><br/>
120+
121+
## License
122+
123+
MIT [@demetory](https://demetrey.ru)

cypress.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from "cypress";
2+
3+
export default defineConfig({
4+
e2e: {
5+
specPattern: "cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}",
6+
baseUrl: "http://localhost:4173",
7+
},
8+
});

cypress/e2e/example.cy.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// https://docs.cypress.io/api/introduction/api.html
2+
3+
describe("My First Test", () => {
4+
it("visits the app root url", () => {
5+
cy.visit("/");
6+
cy.contains("h1", "You did it!");
7+
});
8+
});

cypress/e2e/tsconfig.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "@vue/tsconfig/tsconfig.web.json",
3+
"include": ["./**/*", "../support/**/*"],
4+
"compilerOptions": {
5+
"isolatedModules": false,
6+
"target": "es5",
7+
"lib": ["es5", "dom"],
8+
"types": ["cypress"]
9+
}
10+
}

cypress/fixtures/example.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "Using fixtures to represent data",
3+
"email": "hello@cypress.io",
4+
"body": "Fixtures are a great way to mock data for responses to routes"
5+
}

cypress/support/commands.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/// <reference types="cypress" />
2+
// ***********************************************
3+
// This example commands.ts shows you how to
4+
// create various custom commands and overwrite
5+
// existing commands.
6+
//
7+
// For more comprehensive examples of custom
8+
// commands please read more here:
9+
// https://on.cypress.io/custom-commands
10+
// ***********************************************
11+
//
12+
//
13+
// -- This is a parent command --
14+
// Cypress.Commands.add('login', (email, password) => { ... })
15+
//
16+
//
17+
// -- This is a child command --
18+
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
19+
//
20+
//
21+
// -- This is a dual command --
22+
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
23+
//
24+
//
25+
// -- This will overwrite an existing command --
26+
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
27+
//
28+
// declare global {
29+
// namespace Cypress {
30+
// interface Chainable {
31+
// login(email: string, password: string): Chainable<void>
32+
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
33+
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
34+
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
35+
// }
36+
// }
37+
// }
38+
39+
export {};

cypress/support/e2e.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// ***********************************************************
2+
// This example support/index.js is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
// Import commands.js using ES2015 syntax:
17+
import "./commands";
18+
19+
// Alternatively you can use CommonJS syntax:
20+
// require('./commands')

env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />

index.html

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta http-equiv="x-ua-compatible" content="ie=edge" />
6+
<!--
7+
design the planet
8+
9+
_/_/_/_/_/_/
10+
_/_/ _/_/
11+
_/_/ _/_/
12+
_/_/ _/_/_/
13+
_/_/ _/_/
14+
_/_/ _/_/ _/_/
15+
_/_/_/_/_/_/ _/_/
16+
17+
demetrey.ru
18+
-->
19+
<title>Dim Vue3 Template</title>
20+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
21+
<meta name="description" content="Dim Vue3 Starter Template" />
22+
23+
<meta property="og:title" content="Demetory - Design the Planet" />
24+
<meta property="og:type" content="website" />
25+
<meta property="og:url" content="/" />
26+
<meta property="og:image" content="/cover.jpg" />
27+
28+
<link rel="author" href="/humans.txt" />
29+
<link rel="manifest" href="/site.webmanifest" />
30+
<link rel="apple-touch-icon" href="/icon.png" />
31+
<link rel="icon" href="/favicon.ico" />
32+
33+
<link rel="stylesheet" href="/css/reset.css" />
34+
<link rel="stylesheet" href="/css/noscript.css" />
35+
</head>
36+
37+
<body>
38+
<!--noindex-->
39+
<noscript>
40+
<img src="/images/fatality.svg" />
41+
<div>
42+
<h1>Easy, Tiger</h1>
43+
<p>Turn JavaScript on, don't be so paraniod.</p>
44+
</div>
45+
</noscript>
46+
<!--/noindex-->
47+
48+
<div id="app"></div>
49+
<script type="module" src="/src/main.ts"></script>
50+
</body>
51+
52+
<!-- #StandWithUkraine -->
53+
</html>

0 commit comments

Comments
 (0)