-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from TENEr98/master
chore: README.md refactored and .vscode added extensions and settings
- Loading branch information
Showing
6 changed files
with
138 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"eamodio.gitlens", | ||
"esbenp.prettier-vscode", | ||
"ecmel.vscode-html-css", | ||
"sainoba.px-to-rem", | ||
"streetsidesoftware.code-spell-checker", | ||
"streetsidesoftware.code-spell-checker-russian", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"git.autofetch": true, | ||
"cSpell.language": "en, ru", | ||
"workbench.iconTheme": "material-icon-theme", | ||
"[html][css][scss][javascript]": { | ||
"editor.tabSize": 2, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[json]": { | ||
"editor.tabSize": 2 | ||
}, | ||
"editor.tabSize": 2, | ||
"scm.alwaysShowActions": true, | ||
"editor.formatOnSave": true, | ||
"terminal.integrated.defaultProfile.osx": "bash", | ||
"terminal.integrated.defaultProfile.linux": "bash", | ||
"terminal.integrated.defaultProfile.windows":"bash" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,126 @@ | ||
# Webpack Static Site Starter Kit | ||
|
||
## Требования к проекту | ||
|
||
- [Node 14.18.3](https://nodejs.org/download/release/v14.18.3/) | ||
- [NVM/MacOC](https://tecadmin.net/install-nvm-macos-with-homebrew/) | ||
- [NVM/Windows](https://github.com/coreybutler/nvm-windows/releases) Если Windows то установка только от имени администратора | ||
- [Yarn](https://yarnpkg.com/) | ||
|
||
--- | ||
|
||
## Использование | ||
##### Клонировать репозиторий | ||
``` | ||
|
||
Клонировать репозиторий | ||
|
||
```bash | ||
git clone https://github.com/alex-karo/webpack-static-template block7 | ||
``` | ||
##### В папке block7 перейти в папку проекта | ||
``` | ||
|
||
В папке block7 перейти в папку проекта | ||
|
||
```bash | ||
cd block7 | ||
``` | ||
##### Удалить папку .git | ||
|
||
Удалить папку .git | ||
|
||
```bash | ||
rm -rf .git | ||
``` | ||
rm -fr .git | ||
|
||
--- | ||
|
||
## Если создаете новый проект в github.com | ||
|
||
нужно будет инициализировать git проект, _если данная команда не сработает значит версия git установлена старая, нужно обновить её_ | ||
|
||
```properties | ||
git init -b main | ||
``` | ||
|
||
## Проверка версии ноды | ||
##### Должно вывести версию ноды 14.18.3 | ||
добавить все изменения и сделать первый коммит | ||
|
||
```properties | ||
git add . && git commit -m "initial commit" | ||
``` | ||
|
||
соединить git удаленный с локальным, *USER* (пользователь) и *REPO* (репозиторий) | ||
|
||
```properties | ||
git remote add origin https://github.com/USER/REPO.git | ||
``` | ||
|
||
проверить на то что есть соединение | ||
|
||
```properties | ||
git remote -v | ||
``` | ||
|
||
отправить изменения в удаленный репозиторий | ||
|
||
```properties | ||
git push origin main | ||
``` | ||
|
||
--- | ||
|
||
## Проверка версии ноды | ||
|
||
Должно вывести версию ноды 14.18.3 | ||
|
||
```properties | ||
node -v | ||
``` | ||
|
||
--- | ||
|
||
## Два метода установки зависимостей | ||
##### Установка зависимостей через NPM | ||
|
||
``` | ||
Установка зависимостей через NPM | ||
|
||
```properties | ||
npm install | ||
``` | ||
##### Установка зависимостей через Yarn | ||
``` | ||
|
||
Установка зависимостей через Yarn | ||
|
||
```properties | ||
yarn | ||
``` | ||
|
||
--- | ||
|
||
## Два метода запуска приложения | ||
#### Для запуска веб-сервера с лайврелоадом через NPM | ||
``` | ||
|
||
Для запуска веб-сервера через NPM | ||
|
||
```properties | ||
npm run start | ||
``` | ||
#### Для создания билда через NPM | ||
``` | ||
npm run build | ||
``` | ||
|
||
Для запуска веб-сервера через Yarn | ||
|
||
#### Для запуска веб-сервера с лайврелоадом через Yarn | ||
``` | ||
```properties | ||
yarn start | ||
``` | ||
#### Для создания билда через Yarn | ||
``` | ||
yarn build | ||
``` | ||
|
||
--- | ||
|
||
## Два метода загрузки на Github Pages | ||
**Ваш репозиторий должен быть связан с github репозиторием, после этого выполняем** | ||
#### Загрузка на Github Pages через NPM | ||
``` | ||
|
||
### Ваш репозиторий должен быть связан с github.com репозиторием, после этого выполняем | ||
|
||
Загрузка на Github Pages через NPM | ||
|
||
```properties | ||
npm run deploy | ||
``` | ||
#### Загрузка на Github Pages через Yarn | ||
``` | ||
|
||
Загрузка на Github Pages через Yarn | ||
|
||
```properties | ||
yarn deploy | ||
``` | ||
|
||
Основано на [этой статье](https://hackernoon.com/lets-start-with-webpack-4-91a0f1dba02e) | ||
|
||
Основано на [этой статье](https://hackernoon.com/lets-start-with-webpack-4-91a0f1dba02e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" | ||
/> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
<title><%= htmlWebpackPlugin.options.title %></title> | ||
</head> | ||
<body> | ||
<img src="./img/webpack.svg" alt="Webpack Logo" width="200px"> | ||
<h3>Welcome to Webpack 4 starter </h3> | ||
</body> | ||
</head> | ||
<body> | ||
<img src="./img/webpack.svg" alt="Webpack Logo" width="200px" /> | ||
<h3>Welcome to Webpack 4 starter </h3> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import '../scss/style.scss'; | ||
import '../scss/style.scss' | ||
|
||
console.log('Works!'); | ||
console.log('Works!') |