Skip to content

Commit 856b832

Browse files
committed
Dia 3
1 parent 3f62ec0 commit 856b832

30 files changed

+5014
-0
lines changed
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
2+
charset = utf-8
3+
indent_size = 2
4+
indent_style = space
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
8+
end_of_line = lf
9+
max_line_length = 100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

04-frameworks/03-vue/Dia_3/.gitignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
*.tsbuildinfo
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"semi": false,
4+
"singleQuote": true,
5+
"printWidth": 100
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"Vue.volar",
4+
"vitest.explorer",
5+
"dbaeumer.vscode-eslint",
6+
"EditorConfig.EditorConfig",
7+
"esbenp.prettier-vscode"
8+
]
9+
}

04-frameworks/03-vue/Dia_3/README.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# todolist: Vue 3 + Vite + TypeScript
2+
3+
ToDo List con Vue 3, Vite y TypeScript.
4+
5+
## Stack
6+
7+
- Vue 3
8+
- Vite
9+
- TypeScript
10+
- Pinia
11+
- Tailwind CSS
12+
13+
## Teoría
14+
15+
- [Vue 3](https://v3.vuejs.org/)
16+
17+
- 🧩 _Componentes_ (_SFC_): `template`, `script`, `style`
18+
- 🔠 _Interpolación_: `{{ }}`
19+
- 📝 _Directivas_: `v-if`, `v-for`, `v-model`
20+
- ⚡️ _Composition API_: `defineProps`, `defineEmits`
21+
- 🎯 _Props_: `:propName="propValue"`
22+
- 🎬 _Eventos_: `@click`, `@input`, `@my-event`
23+
- 🔄 _Lifecycle Hooks_: `onMounted`, `onBeforeUnmount`, etc
24+
- 🎨 _Estilos_: `:class`, `:style`, `scoped`
25+
26+
- [Pinia](https://pinia.esm.dev/)
27+
28+
- `defineStore`
29+
- State
30+
- Actions
31+
32+
- [Vue Devtools](https://devtools.vuejs.org/)
33+
34+
## Project Setup
35+
36+
```sh
37+
pnpm install
38+
```
39+
40+
### Compile and Hot-Reload for Development
41+
42+
```sh
43+
pnpm dev
44+
```
45+
46+
### Type-Check, Compile and Minify for Production
47+
48+
```sh
49+
pnpm build
50+
```
51+
52+
### Run Unit Tests with [Vitest](https://vitest.dev/)
53+
54+
```sh
55+
pnpm test:unit
56+
```
57+
58+
### Lint with [ESLint](https://eslint.org/)
59+
60+
```sh
61+
pnpm lint
62+
```

04-frameworks/03-vue/Dia_3/env.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import pluginVue from 'eslint-plugin-vue'
2+
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
3+
import pluginVitest from '@vitest/eslint-plugin'
4+
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
5+
6+
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
7+
// import { configureVueProject } from '@vue/eslint-config-typescript'
8+
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
9+
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
10+
11+
export default defineConfigWithVueTs(
12+
{
13+
name: 'app/files-to-lint',
14+
files: ['**/*.{ts,mts,tsx,vue}'],
15+
},
16+
17+
{
18+
name: 'app/files-to-ignore',
19+
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
20+
},
21+
22+
pluginVue.configs['flat/essential'],
23+
vueTsConfigs.recommended,
24+
25+
{
26+
...pluginVitest.configs.recommended,
27+
files: ['src/**/__tests__/*'],
28+
},
29+
skipFormatting,
30+
)

04-frameworks/03-vue/Dia_3/index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Todo App</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "todolist",
3+
"version": "0.0.0",
4+
"private": true,
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "run-p type-check \"build-only {@}\" --",
9+
"preview": "vite preview",
10+
"test:unit": "vitest",
11+
"build-only": "vite build",
12+
"type-check": "vue-tsc --build",
13+
"lint": "eslint . --fix",
14+
"format": "prettier --write src/"
15+
},
16+
"dependencies": {
17+
"pinia": "^3.0.1",
18+
"vue": "^3.5.13",
19+
"vue-router": "^4.5.0"
20+
},
21+
"devDependencies": {
22+
"@tsconfig/node22": "^22.0.0",
23+
"@types/jsdom": "^21.1.7",
24+
"@types/node": "^22.13.9",
25+
"@vitejs/plugin-vue": "^5.2.1",
26+
"@vitest/eslint-plugin": "^1.1.36",
27+
"@vue/eslint-config-prettier": "^10.2.0",
28+
"@vue/eslint-config-typescript": "^14.5.0",
29+
"@vue/test-utils": "^2.4.6",
30+
"@vue/tsconfig": "^0.7.0",
31+
"autoprefixer": "^10.4.21",
32+
"eslint": "^9.21.0",
33+
"eslint-plugin-vue": "~10.0.0",
34+
"jiti": "^2.4.2",
35+
"jsdom": "^26.0.0",
36+
"npm-run-all2": "^7.0.2",
37+
"postcss": "^8.5.3",
38+
"prettier": "3.5.3",
39+
"tailwindcss": "3",
40+
"typescript": "~5.8.0",
41+
"vite": "^6.2.1",
42+
"vite-plugin-vue-devtools": "^7.7.2",
43+
"vitest": "^3.0.8",
44+
"vue-tsc": "^2.2.8"
45+
}
46+
}

0 commit comments

Comments
 (0)