-
Notifications
You must be signed in to change notification settings - Fork 0
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 #2 from SergeyAkkuratov/sakkuratov
Приложение "Прогноз погоды"
- Loading branch information
Showing
27 changed files
with
4,169 additions
and
622 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
coverage | ||
dist |
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,26 +1,27 @@ | ||
name: PR Check, GitHub Pages deploy, CodeSandbox link | ||
name: Check, Build and GitHub Pages deploy | ||
|
||
on: | ||
pull_request: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
pull-requests: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-20.04 | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -33,34 +34,15 @@ jobs: | |
- name: Test check | ||
run: | | ||
npm run test | ||
annotate_pull_request: | ||
runs-on: ubuntu-latest | ||
name: perform annotation | ||
steps: | ||
- name: annotation action step | ||
id: annotation | ||
uses: kherin/[email protected] | ||
with: | ||
annotation-url: "https://githubbox.com/" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Single deploy job since we're just deploying | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: check | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Build | ||
run: | | ||
npm run build | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "./src" | ||
path: "./dist" | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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,5 +1,98 @@ | ||
# OTUS_homework_lesson07 | ||
<br/> | ||
<p align="center"> | ||
<h3 align="center">Приложение "Прогноз погоды"</h3> | ||
<p align="center"> | ||
Выполнение домашнего задания для лекции "Современный инструментарий при разработке клиентских (и не только приложений)" | ||
<br/> | ||
<br/> | ||
</p> | ||
</p> | ||
|
||
[![Check, Build and GitHub Pages deploy](https://github.com/SergeyAkkuratov/OTUS_homework_lesson07/actions/workflows/pull_request_check.yml/badge.svg?branch=sakkuratov)](https://github.com/SergeyAkkuratov/OTUS_homework_lesson07/actions/workflows/pull_request_check.yml) | ||
[![Check, Build and GitHub Pages deploy](https://github.com/SergeyAkkuratov/OTUS_homework_lesson07/actions/workflows/pull_request_check.yml/badge.svg?branch=sakkuratov&event=pull_request)](https://github.com/SergeyAkkuratov/OTUS_homework_lesson07/actions/workflows/pull_request_check.yml) | ||
![Contributors](https://img.shields.io/github/contributors/SergeyAkkuratov/OTUS_homework_lesson07?color=dark-green) ![Issues](https://img.shields.io/github/issues/SergeyAkkuratov/OTUS_homework_lesson07) | ||
|
||
Выполнение домашнего задания для лекции "Код как «проект» - артефакты работы разработчика. Зависимости и утилиты в стеке JavaScript" | ||
## Содержание | ||
|
||
- [О проекте](#о-проекте) | ||
- [Попробовать онлайн](#попробовать-онлайн) | ||
- [Требования для локального запуска](#требования-для-локального-запуска) | ||
- [Локальный запуск](#Локальный-запуск) | ||
- [Использование](#использование) | ||
- [Структура проекта](#структура-проекта) | ||
|
||
## О проекте | ||
|
||
![Screen Shot](images/about.png) | ||
|
||
Приложение "Прогноз погоды" это Web приложение разработанное на языке JavaScript. Оно предназначено для просмотра текущей погоды в конкретном городе. | ||
|
||
Приложение показывает текущую температуру в градусах цельсия и общее состоянии погоды, обозначенное иконкой. | ||
|
||
Так же приложение отображает компактную картинку с картой выбранного города. | ||
|
||
Подробные инструкции для работы с приложением смотрите в разделе [Использование](#использование). | ||
|
||
## Попробовать онлайн | ||
|
||
Приложение запущено на GitHub Pages, так что вы можете опробовать его перейдя по [ссылке](https://sergeyakkuratov.github.io/OTUS_homework_lesson07/). | ||
|
||
## Требования для локального запуска | ||
|
||
Для того, чтобы запустить приложение локально, вам потребуется установить: | ||
|
||
- Node.js и npm (через nvm) - воспользуйтесь официальной [инструкцией](https://github.com/nvm-sh/nvm). | ||
- Git - [скачать](https://git-scm.com/downloads) и установить согласно инструкции. | ||
|
||
## Локальный запуск | ||
|
||
1. Склонировать репозиторий | ||
|
||
```sh | ||
git clone https://github.com/your_username_/Project-Name.git | ||
``` | ||
|
||
2. Установить NPM пакеты | ||
|
||
```sh | ||
npm install | ||
``` | ||
|
||
3. Запустить локальный сервер | ||
|
||
```sh | ||
npm run dev | ||
``` | ||
|
||
## Использование | ||
|
||
Приложение обладает следующими возможностями: | ||
|
||
- При старте показывает карту и текущую погоду в городе, где вы находитесь | ||
|
||
![Screen Shot](images/start.png) | ||
|
||
- Показывает карту и текущую погоду в указанном городе. Для этого нужно ввести название города в поле ввода и нажать клавишу Enter. Последние 10 названий городов попадают в колонку History. | ||
|
||
![Screen Shot](images/cityWeather.png) | ||
|
||
- Показывает карту и текущую погоду в городе, на название которого кликнули в колонке History. | ||
|
||
![Screen Shot](images/history.png) | ||
|
||
## Структура проекта | ||
|
||
- github | ||
- workflows - настройки для GitHub Actions | ||
- .husky - настройки для подготовки файлов согласно правилам линта перед коммитом | ||
- images - скриншоты для файла README.md | ||
- mocks - настройки для мокирования загрузки файлов | ||
- src - исходный код проекта | ||
- assets - изображения для приложения и тестов | ||
- comonTestData.js - общие тестовые данные для тестов | ||
- externalRequests.js - REST запросы к внешним ресурсам | ||
- externalRequests.test.js - тесты на REST запросы к внешним ресурсам | ||
- index.js - точка входа в программу | ||
- style.css - описание стилей программы | ||
- template.html - шаблон страницы index.html | ||
- weatherApp.js - главный модуль приложения | ||
- weatherApp.test.js - функциональные тесты приложения |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export default ""; |
Oops, something went wrong.