Skip to content

Commit 0078ba3

Browse files
authored
Merge pull request #12 from IvanSavoskin/develop
Release 1.2.0
2 parents 0daf9cf + 7510c67 commit 0078ba3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1803
-850
lines changed

.github/workflows/build.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: build
22

3-
on:
4-
push:
5-
branches: [ master, develop ]
6-
pull_request:
7-
branches: [ master, develop ]
3+
on: [pull_request]
84

95
jobs:
106
build:

.github/workflows/release.yml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
env:
2+
DIRECTORY: dist
3+
4+
name: Release
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'Release version. Example: 1.0.0'
10+
required: true
11+
type: string
12+
jobs:
13+
Version:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 20
19+
- uses: actions/setup-node@v3
20+
with:
21+
node-version: 20
22+
cache: npm
23+
- name: install
24+
run: npm ci || npm install
25+
- name: Create tag
26+
uses: actions/github-script@v6
27+
with:
28+
github-token: ${{ secrets.GITHUB_TOKEN }}
29+
script: |
30+
github.rest.git.createRef({
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
ref: 'refs/tags/v${{ inputs.version }}>',
34+
sha: context.sha
35+
})
36+
- if: ${{ inputs.version }}
37+
name: Create release
38+
uses: actions/github-script@v6
39+
with:
40+
github-token: ${{ secrets.GITHUB_TOKEN }}
41+
script: >
42+
await github.request(`POST /repos/${{ github.repository
43+
}}/releases`, {
44+
tag_name: "v${{ inputs.version }}",
45+
generate_release_notes: true
46+
});
47+
Submit:
48+
if: github.event_name == 'workflow_dispatch'
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
command:
53+
- chrome
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v3
57+
- uses: actions/setup-node@v3
58+
with:
59+
node-version: 20
60+
cache: npm
61+
- name: install
62+
run: npm ci || npm install
63+
- run: npm run prod --if-present
64+
- name: Update extension’s meta
65+
run: >-
66+
npx dot-json@1 $DIRECTORY/manifest.json version ${{ inputs.version }}
67+
- name: Submit
68+
run: |
69+
case ${{ matrix.command }} in
70+
chrome)
71+
cd $DIRECTORY && npx chrome-webstore-upload-cli@2 upload --auto-publish
72+
;;
73+
esac
74+
env:
75+
EXTENSION_ID: ${{ secrets.EXTENSION_ID }}
76+
CLIENT_ID: ${{ secrets.CLIENT_ID }}
77+
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
78+
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

README.RU.md

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<header>
2+
3+
<div style="text-align: center">
4+
<h1>Bitcoin blocks tracker</h1>
5+
6+
<p>Расширение для отслеживания блоков Bitcoin и комиссий с помощью Mempool Space</p>
7+
8+
[README in English](./README)
9+
10+
<a rel="noreferrer noopener" target="_blank" href="https://chromewebstore.google.com/detail/bitcoin-blocks-tracker/jhdbfjhembciojemihcimllmbibiakim">
11+
<img alt="Chrome Web Store" src="https://img.shields.io/chrome-web-store/v/jhdbfjhembciojemihcimllmbibiakim?color=red&label=%D0%B0%D0%BA%D1%82%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F%20%D0%B2%D0%B5%D1%80%D1%81%D0%B8%D1%8F&logo=google-chrome&logoColor=red&style=for-the-badge">
12+
</a>
13+
<a rel="noreferrer noopener" target="_blank" href="https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension/releases">
14+
<img alt="Новейший релиз" src="https://img.shields.io/github/v/release/IvanSavoskin/bitcoin-blocks-tracker-extension?label=%D1%81%D0%B2%D0%B5%D0%B6%D0%B8%D0%B9%20%D1%80%D0%B5%D0%BB%D0%B8%D0%B7&logo=github&style=for-the-badge">
15+
</a>
16+
<a href="https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension">
17+
<img src="https://img.shields.io/github/languages/top/IvanSavoskin/bitcoin-blocks-tracker-extension?style=flat-square&logo=github" alt="GitHub основной язык" />
18+
</a>
19+
<a href="https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension/workflows/build/badge.svg">
20+
<img src="https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension/workflows/build/badge.svg" alt="Сборка" />
21+
</a>
22+
</div>
23+
24+
</header>
25+
26+
## Введение
27+
28+
Это расширение создано для того, чтобы легко и удобно отслеживать появление новых блоков в сети Bitcoin.
29+
После того, как новый блок будет смайнен, расширение оповещает пользователя звуковым сигналом.
30+
Расширение также позволяет быстро отслеживать текущие комиссии в сети.
31+
32+
Получение данных о блоках и комиссиях осуществляется с помощью [mempool.space](https://mempool.space/)
33+
34+
## Функции
35+
36+
- Получение звукового уведомления при появлении нового блока в основной или тестовой сети
37+
сети Bitcoin
38+
- Получение звукового уведомления при пересечении комиссией в сети заданного значения
39+
- Получение информации о текущих комиссиях в сети Bitcoin
40+
- Получение информации о времени появления последнего блока
41+
42+
## Установка
43+
44+
**Нажмите [сюда][1], а затем нажмите "Установить" на открывшейся странице**
45+
46+
> * Разработано и протестировано для **Google Chrome**
47+
> * Может быть установлено в любом браузере Chromium - Opera (GX), Vivaldi и т.д.
48+
> * В Microsoft Edge сначала нажмите «Разрешить расширения из других магазинов» (появится запрос)
49+
50+
### Когда версия для Firefox?
51+
52+
На данный момент **версия для Firefox не планируется**.
53+
54+
1. Firefox не поддерживает некоторые важные функции расширения *(PiP API и background service workers)*.
55+
2. Для частичной поддержки потребуется сильно изменить рабочий процесс.
56+
3. Нет спроса на версию для Firefox.
57+
58+
## Локальная установка
59+
60+
### Предустановки
61+
1. Скачай [свежий релиз][2] либо весь репозиторий
62+
2. Установите Node.js (требуемая версия в [package.json](./package.json))
63+
3. Должен быть установлен совместимый `npm`
64+
4. В терминале выполните команду `npm install` из папки проекта
65+
66+
### Линтеры
67+
Для контроля качества кода предусмотрено подключение линтеров.
68+
69+
#### ESLint
70+
Правила для ESLint указаны в файле `/.eslintrc`.
71+
72+
Проверка кода с использованием ESLint запускается командой `npm run eslint`.
73+
74+
#### Stylelint
75+
Правила для Stylelint указаны в файле `/.stylelintrc.json`.
76+
77+
Проверка стилей с помощью Stylelint запускается командой
78+
79+
### Сборка для разработки
80+
Запустите dev сборку с помощью команды `npm run dev`.
81+
82+
После сборки будет создана папка `/dist` со сборкой расширения,
83+
которую можно использовать для добавления в браузер.
84+
85+
Каждое изменение кода автоматически инициирует пересборку расширения.
86+
87+
Во время сборки также добавляется source map, позволяющие использовать Chrome Dev Tools
88+
89+
### Промышленная сборка
90+
Запустите prod сборку с помощью команды `npm run prod`.
91+
92+
Перед сборкой автоматически запускается проверка кода с помощью ESLint и StyleLint.
93+
94+
Собранный проект сохраняется в папке `/dist`.
95+
96+
### Загрузить расширение в Chrome
97+
98+
Загрузить каталог `dist` на странице расширения Chrome ([инструкция](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked))
99+
100+
[1]: https://chromewebstore.google.com/detail/bitcoin-blocks-tracker/jhdbfjhembciojemihcimllmbibiakim
101+
[2]: https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension/releases

README.md

+31-5
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55

66
<p>Extension for track Bitcoin blocks and fees via Mempool space</p>
77

8+
[README на Русском](./README.RU)
9+
810
<a rel="noreferrer noopener" target="_blank" href="https://chromewebstore.google.com/detail/bitcoin-blocks-tracker/jhdbfjhembciojemihcimllmbibiakim">
9-
<img alt="Chrome Web Store" src="https://img.shields.io/badge/Chrome-141e24.svg?&style=for-the-badge&logo=google-chrome&logoColor=white">
11+
<img alt="Chrome Web Store" src="https://img.shields.io/chrome-web-store/v/jhdbfjhembciojemihcimllmbibiakim?color=red&label=%D0%B0%D0%BA%D1%82%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F%20%D0%B2%D0%B5%D1%80%D1%81%D0%B8%D1%8F&logo=google-chrome&logoColor=red&style=for-the-badge">
12+
</a>
13+
<a rel="noreferrer noopener" target="_blank" href="https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension/releases">
14+
<img alt="Newest release" src="https://img.shields.io/github/v/release/IvanSavoskin/bitcoin-blocks-tracker-extension?label=%D1%81%D0%B2%D0%B5%D0%B6%D0%B8%D0%B9%20%D1%80%D0%B5%D0%BB%D0%B8%D0%B7&logo=github&style=for-the-badge">
1015
</a>
1116
<a href="https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension">
1217
<img src="https://img.shields.io/github/languages/top/IvanSavoskin/bitcoin-blocks-tracker-extension?style=flat-square&logo=github" alt="GitHub top language" />
@@ -30,15 +35,33 @@ Obtaining blocks and fees data is done using [mempool.space](https://mempool.spa
3035

3136
- Receiving sound notification when a new block appears in the mainnet or testnet of the
3237
Bitcoin network
38+
- Receiving a sound notification when the fee in the network crosses a specified value
3339
- Obtaining information about current fees in the Bitcoin network
3440
- Obtaining information about the time the last block appeared
3541

42+
## Installation
43+
44+
**Click [here][1], then click "Add to Chrome"**
45+
46+
> * Developed and tested for **Google Chrome**
47+
> * Can be installed on any Chromium browser - Opera (GX), Vivaldi, etc.
48+
> * In Microsoft Edge, click "Allow extensions from other stores" fisrt (is asked)
49+
50+
### Firefox version when?
51+
52+
There are currently no plans to support Firefox.
53+
54+
1. Firefox does not support some crucial functions *(Background service workers)*.
55+
2. Partial support will require an extensive tooling changes.
56+
3. There is no demand for the Firefox version.
57+
3658
## Local installation
3759

3860
### Prerequisites
39-
1. You need to preinstall `node@^20.x`
40-
2. Compatible `npm` must be installed
41-
3. In the terminal, run the `npm install` command from the project folder
61+
1. Download [latest release][2] or the whole repository
62+
2. Install Node.js (required version in [package.json](./package.json))
63+
3. Compatible `npm` must be installed
64+
4. In the terminal, run the `npm install` command from the project folder
4265

4366
### Linters
4467
To monitor the quality of the code, the project provides for the connection of linters.
@@ -49,7 +72,7 @@ Rules for ESLint are specified in the `/.eslintrc` file.
4972
Code checking using ESLint starts with the command `npm run eslint`.
5073

5174
#### Stylelint
52-
Rules for Stylelint are specified in the `kalita/.stylelintrc.json` file.
75+
Rules for Stylelint are specified in the `/.stylelintrc.json` file.
5376

5477
Styles checking using Stylelint starts with the command `npm run stylelint`.
5578

@@ -73,3 +96,6 @@ Built project is stored in the `/dist` folder.
7396
### Load extension to Chrome
7497

7598
Load `dist` directory on Chrome extension page ([instruction](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked))
99+
100+
[1]: https://chromewebstore.google.com/detail/bitcoin-blocks-tracker/jhdbfjhembciojemihcimllmbibiakim
101+
[2]: https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension/releases

0 commit comments

Comments
 (0)