Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Выполнил тестовое задание #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
}
}
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}
125 changes: 28 additions & 97 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,115 +1,46 @@
<!-- title: Тестовое задание -->
<p>
<h1 align="center">Тестовое задание VueJS</h1>
<br>
</p>
# .

> После пуша Vue в ваш репозиторий, сделайте задание в любой другой ветке и PR в основную.
> Подойдет как Vue2, так и Vue3
This template should help get you started developing with Vue 3 in Vite.

</br>
## Recommended IDE Setup

[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).

![IMAGE](image.png "Image")
## Type Support for `.vue` Imports in TS

Задача: сделать рабочую страницу с изображения.
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.

Дизайн не требуется. Достаточно схематичной страницы, как на изображении.
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:

#### Блоки снизу:
Слева - вещи у пользователя
Справа - вещи на выбор
1. Disable the built-in TypeScript Extension
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.

#### Блоки сверху:
Слева - выбранные вещи из вещей пользователя (блок снизу-слева)
Справа - выбранная вещь из вещей на выбор (блок снизу-справа).
## Customize configuration

Объекты вещей имеют одинаковую структуру, отличаются только названием и номером.
See [Vite Configuration Reference](https://vitejs.dev/config/).

---
## Project Setup

## Механика работы

Снизу-справа можно выбрать одновременно `только 1 вещь`, которая должна отображаться справа-сверху.
```sh
npm install
```

Снизу-слева можно выбрать `от 1 до 6 вещей`, которые должны отображаться в верхней левой части в порядке выбора.
### Compile and Hot-Reload for Development

---
```sh
npm run dev
```

Коллекции для заполнения нижних блоков слева и справа:
### Type-Check, Compile and Minify for Production

### Блок слева
```
[
{
"id": 1,
"name": "Shoes 1"
},
{
"id": 2,
"name": "Shoes 2"
},
{
"id": 3,
"name": "Shoes 3"
},
{
"id": 4,
"name": "Shoes 4"
},
{
"id": 5,
"name": "T-shirt 1"
},
{
"id": 6,
"name": "T-shirt 2"
},
{
"id": 7,
"name": "T-shirt 3"
},
{
"id": 8,
"name": "T-shirt 4"
}
]
```sh
npm run build
```

### Блок справа
### Lint with [ESLint](https://eslint.org/)

```sh
npm run lint
```
[
{
"id": 11,
"name": "Jacket 1"
},
{
"id": 12,
"name": "Jacket 2"
},
{
"id": 13,
"name": "Jacket 3"
},
{
"id": 14,
"name": "Jacket 4"
},
{
"id": 15,
"name": "Hoodie 1"
},
{
"id": 16,
"name": "Hoodie 2"
},
{
"id": 17,
"name": "Hoodie 3"
},
{
"id": 18,
"name": "Hoodie 4"
}
]
```
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src"></script>
</body>
</html>
Loading