Skip to content

Commit 72d23d0

Browse files
committed
added boilerplate to live repo
2 parents d71aafe + 8733725 commit 72d23d0

31 files changed

+13733
-0
lines changed

.eslintrc.cjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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/recommended",
10+
"@vue/eslint-config-prettier"
11+
],
12+
"overrides": [
13+
{
14+
"files": [
15+
"cypress/e2e/**.{cy,spec}.{js,ts,jsx,tsx}"
16+
],
17+
"extends": [
18+
"plugin:cypress/recommended"
19+
]
20+
}
21+
]
22+
}

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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?

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
3+
}

README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,75 @@
55
We're super excited to be teaming up with the community to build a SaaS Project Management App together!
66

77
Use this repo to keep up with the code as it's being worked on live by event speakers.
8+
9+
You can merge changes from this repo into your own working project by adding it as a remote:
10+
11+
```
12+
git remote add speakers [email protected]:vueschool/vuejs-forge-the-project.git
13+
```
14+
15+
and then pulling and merging (if you've made updates to your own codebase, you may need to resolve any resulting merge conflicts)
16+
17+
```
18+
git pull speakers main
19+
```
20+
21+
# Project Setup
22+
23+
This template should help get you started developing with Vue 3 in Vite.
24+
25+
## Recommended IDE Setup
26+
27+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
28+
29+
## Type Support for `.vue` Imports in TS
30+
31+
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
32+
33+
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
34+
35+
1. Disable the built-in TypeScript Extension
36+
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
37+
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
38+
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
39+
40+
## Customize configuration
41+
42+
See [Vite Configuration Reference](https://vitejs.dev/config/).
43+
44+
## Project Setup
45+
46+
```sh
47+
npm install
48+
```
49+
50+
### Compile and Hot-Reload for Development
51+
52+
```sh
53+
npm run dev
54+
```
55+
56+
### Type-Check, Compile and Minify for Production
57+
58+
```sh
59+
npm run build
60+
```
61+
62+
### Run Unit Tests with [Vitest](https://vitest.dev/)
63+
64+
```sh
65+
npm run test:unit
66+
```
67+
68+
### Run End-to-End Tests with [Cypress](https://www.cypress.io/)
69+
70+
```sh
71+
npm run build
72+
npm run test:e2e # or `npm run test:e2e:ci` for headless testing
73+
```
74+
75+
### Lint with [ESLint](https://eslint.org/)
76+
77+
```sh
78+
npm run lint
79+
```

components.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// generated by unplugin-vue-components
2+
// We suggest you to commit this file into source control
3+
// Read more: https://github.com/vuejs/core/pull/3399
4+
import '@vue/runtime-core'
5+
6+
declare module '@vue/runtime-core' {
7+
export interface GlobalComponents {
8+
AppButton: typeof import('./src/components/AppButton.vue')['default']
9+
RouterLink: typeof import('vue-router')['RouterLink']
10+
RouterView: typeof import('vue-router')['RouterView']
11+
}
12+
}
13+
14+
export {}

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": "[email protected]",
4+
"body": "Fixtures are a great way to mock data for responses to routes"
5+
}

cypress/support/commands.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
// }

0 commit comments

Comments
 (0)