initial
This commit is contained in:
commit
3b5b913e39
2
.eslintignore
Normal file
2
.eslintignore
Normal file
@ -0,0 +1,2 @@
|
||||
node_modules
|
||||
dist
|
16
.eslintrc.json
Normal file
16
.eslintrc.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
},
|
||||
"extends": ["airbnb-base", "prettier"],
|
||||
"plugins": ["prettier"],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 12,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"prettier/prettier": "error",
|
||||
"no-console": "off"
|
||||
}
|
||||
}
|
42
.gitignore
vendored
Normal file
42
.gitignore
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# Compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
/bazel-out
|
||||
|
||||
# Node
|
||||
/node_modules
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
# IDEs and editors
|
||||
.idea/
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# Miscellaneous
|
||||
/.angular/cache
|
||||
.sass-cache/
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# System files
|
||||
.DS_Store
|
||||
Thumbs.db
|
7
.prettierrc
Normal file
7
.prettierrc
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"tabWidth": 4,
|
||||
"singleQuote": false,
|
||||
"printWidth": 120,
|
||||
"trailingComma": "es5",
|
||||
"useTabs": false
|
||||
}
|
8
.vscode/extensions.json
vendored
Normal file
8
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"usernamehw.errorlens",
|
||||
"AndersEAndersen.html-class-suggestions",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode"
|
||||
]
|
||||
}
|
18
.vscode/launch.json
vendored
Normal file
18
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"type": "chrome",
|
||||
"name": "Debug",
|
||||
"request": "launch",
|
||||
"url": "http://localhost:5173"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"name": "Start",
|
||||
"request": "launch",
|
||||
"runtimeExecutable": "npm",
|
||||
"runtimeArgs": ["run-script", "start"],
|
||||
"console": "integratedTerminal"
|
||||
}
|
||||
]
|
||||
}
|
40
.vscode/settings.json
vendored
Normal file
40
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"files.autoSave": "onFocusChange",
|
||||
"files.eol": "\n",
|
||||
"editor.detectIndentation": false,
|
||||
"editor.formatOnType": false,
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.tabSize": 4,
|
||||
"editor.insertSpaces": true,
|
||||
"editor.accessibilitySupport": "off",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": "explicit",
|
||||
"source.sortImports": "explicit"
|
||||
},
|
||||
"editor.snippetSuggestions": "bottom",
|
||||
"debug.toolBarLocation": "commandCenter",
|
||||
"debug.showVariableTypes": true,
|
||||
"errorLens.gutterIconsEnabled": true,
|
||||
"errorLens.messageEnabled": false,
|
||||
"prettier.tabWidth": 4,
|
||||
"prettier.singleQuote": false,
|
||||
"prettier.printWidth": 120,
|
||||
"prettier.trailingComma": "es5",
|
||||
"prettier.useTabs": false,
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[css]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[html]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
||||
}
|
0
css/style.css
Normal file
0
css/style.css
Normal file
75
index.html
Normal file
75
index.html
Normal file
@ -0,0 +1,75 @@
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Моя страница</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<link href="./node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="./node_modules/bootstrap-icons/font/bootstrap-icons.min.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="./css/style.css" />
|
||||
</head>
|
||||
|
||||
<body class="h-100 d-flex flex-column">
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-md bg-body-tertiary" data-bs-theme="dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="/">
|
||||
<i class="bi bi-app"></i>
|
||||
Мой сайт
|
||||
</a>
|
||||
<button
|
||||
class="navbar-toggler"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#navbarNav"
|
||||
aria-controls="navbarNav"
|
||||
aria-expanded="false"
|
||||
aria-label="Toggle navigation"
|
||||
>
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="navbar-collapse collapse justify-content-end" id="navbarNav">
|
||||
<div class="navbar-nav">
|
||||
<a class="nav-link active" href="./index.html">Главная страница</a>
|
||||
<a class="nav-link" href="./index.html">Вторая страница</a>
|
||||
<a class="nav-link" href="./index.html">Третья страница</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<main class="container-fluid p-3">
|
||||
<h1>Пример web-страницы.</h1>
|
||||
<h2>1. Структурные элементы</h2>
|
||||
<p>
|
||||
<b>Полужирное начертание <i>курсив</i></b>
|
||||
</p>
|
||||
<p>Абзац 2 <a href="index.html">Ссылка</a></p>
|
||||
<h3>1.1. Списки</h3>
|
||||
<p>Список маркированный:</p>
|
||||
<ul>
|
||||
<li><a href="index.html" target="_blank">Элемент списка 1</a></li>
|
||||
<li>Элемент списка 2</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
<p>Список нумерованный:</p>
|
||||
<ol>
|
||||
<li>Элемент списка 1</li>
|
||||
<li>Элемент списка 2</li>
|
||||
<li>...</li>
|
||||
</ol>
|
||||
</main>
|
||||
<footer
|
||||
class="p-2 bg-body-tertiary mt-auto d-flex flex-shrink-0 justify-content-center align-items-center"
|
||||
data-bs-theme="dark"
|
||||
>
|
||||
<span class="text-light">Автор, 2022</span>
|
||||
</footer>
|
||||
<script type="module">
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
console.log("test");
|
||||
alert("test");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
8090
package-lock.json
generated
Normal file
8090
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
29
package.json
Normal file
29
package.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "int-prog",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "npm-run-all --parallel fake-back vite",
|
||||
"vite": "vite",
|
||||
"serve": "http-server -p 3000 ./dist/",
|
||||
"build": "vite build",
|
||||
"fake-back": "json-server -p 3001 --watch db.json",
|
||||
"prod": "npm-run-all build serve",
|
||||
"lint": "eslint . --ext js --report-unused-disable-directives --max-warnings 0"
|
||||
},
|
||||
"dependencies": {
|
||||
"bootstrap": "5.3.3",
|
||||
"bootstrap-icons": "1.11.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"http-server": "14.1.1",
|
||||
"json-server": "1.0.0-beta.3",
|
||||
"vite": "5.4.8",
|
||||
"npm-run-all": "4.1.5",
|
||||
"eslint": "8.57.1",
|
||||
"eslint-config-airbnb-base": "15.0.0",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"eslint-plugin-import": "2.31.0",
|
||||
"eslint-plugin-prettier": "5.2.1"
|
||||
}
|
||||
}
|
47
readme.md
Normal file
47
readme.md
Normal file
@ -0,0 +1,47 @@
|
||||
#### Установка nvm for Windows
|
||||
|
||||
1. Скачать архив по ссылке
|
||||
|
||||
https://github.com/coreybutler/nvm-windows/releases/download/1.1.12/nvm-setup.exe
|
||||
|
||||
2. Запустить cmd с правами администратора
|
||||
|
||||
Запустить cmd можно из меню пуск. Открываете меню, вводите cmd.
|
||||
ПКМ по элементу "Командная строка" -> Запуск от имени администратора
|
||||
|
||||
3. Выполнить в терминале (cmd) команды для установки и активации nodejs:
|
||||
|
||||
```
|
||||
nvm install lts
|
||||
nvm use lts
|
||||
```
|
||||
|
||||
#### Установка VSCode
|
||||
|
||||
Необходимо установить VSCode и открыть проект.
|
||||
|
||||
Для открытия проекта следует использовать меню File.
|
||||
|
||||
File -> Open Folder
|
||||
|
||||
Далее необходимо выбрать каталог с проектом.
|
||||
|
||||
После открытия проекта необходимо согласиться с установкой требуемых расширений.
|
||||
|
||||
#### Установка библиотек
|
||||
|
||||
В VSCode необходимо открыть терминал: Terminal -> New terminal.
|
||||
|
||||
В терминале следует выполнить команду:
|
||||
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
#### Запуск проекта
|
||||
|
||||
Для запуска проекта следует выполнить в терминале VSCode:
|
||||
|
||||
```
|
||||
npm start
|
||||
```
|
13
vite.config.js
Normal file
13
vite.config.js
Normal file
@ -0,0 +1,13 @@
|
||||
import { resolve } from "path";
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: resolve(__dirname, "index.html"),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
Loading…
Reference in New Issue
Block a user