Skip to content

Commit 255eb7f

Browse files
committed
[Refactor] Updated code quality
1 parent 839271b commit 255eb7f

31 files changed

+2392
-2190
lines changed

.all-shieldsrc

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -206,37 +206,41 @@
206206
"id": "projects-badges3",
207207
"badges": [
208208
{
209-
"url": "https://github.com/ptkdev-components/webcomponent-instagram-widget",
209+
"url": "https://github.com/ptkdev-components",
210210
"color": "#e74c3c",
211-
"label": "📸 WebComponent",
212-
"message": "Instagram Widget",
211+
"label": "🚧 WebComponents",
212+
"message": "My Collection",
213213
"style": "flat",
214214
"logo": "",
215215
"platform": "shields"
216216
},
217217
{
218-
"url": "https://github.com/ptkdev-components/webcomponent-patreon-box",
219-
"color": "#e74c3c",
220-
"label": "👑 WebComponent",
221-
"message": "My Patreon Box",
218+
"url": "https://github.com/ptkdev/aboutmeinfo-telegram-bot",
219+
"color": "#1FA0F2",
220+
"label": "🔖 Bot",
221+
"message": "AboutMeInfo",
222222
"style": "flat",
223223
"logo": "",
224224
"platform": "shields"
225225
},
226226
{
227-
"url": "https://github.com/ptkdev-components/webcomponent-carousel-slideshow",
228-
"color": "#e74c3c",
229-
"label": "🏞 WebComponent",
230-
"message": "Carousel Slideshow",
227+
"url": "https://github.com/ptkdev/quizquickanswer-telegram-game-bot",
228+
"color": "#FEC91A",
229+
"label": "⏱ Bot",
230+
"message": "QuizQuickAnswer",
231231
"style": "flat",
232232
"logo": "",
233233
"platform": "shields"
234-
}
235-
]
236-
},
237-
{
238-
"id": "projects-badges4",
239-
"badges": [
234+
},
235+
{
236+
"url": "https://t.me/gamebookchatbot",
237+
"color": "#34495e",
238+
"label": "📚 Bot",
239+
"message": "GameBookChat",
240+
"style": "flat",
241+
"logo": "",
242+
"platform": "shields"
243+
},
240244
{
241245
"url": "https://github.com/ptkdev/vscode-theme-dark-blood",
242246
"color": "#f1c40f",
@@ -247,14 +251,19 @@
247251
"platform": "shields"
248252
},
249253
{
250-
"url": "https://t.me/gamebookchatbot",
251-
"color": "#34495e",
252-
"label": "📚 Bot",
253-
"message": "GameBookChat",
254+
"url": "https://github.com/sourcesense/joyce",
255+
"color": "#CECBE6",
256+
"label": "🗄 Sourcesense",
257+
"message": "Joyce",
254258
"style": "flat",
255259
"logo": "",
256260
"platform": "shields"
257-
},
261+
}
262+
]
263+
},
264+
{
265+
"id": "projects-badges4",
266+
"badges": [
258267
{
259268
"url": "https://github.com/ptkdev-boilerplate?q=svelte",
260269
"color": "#f368e0",
@@ -301,7 +310,7 @@
301310
"platform": "shields"
302311
},
303312
{
304-
"url": "https://github.com/ptkdev/ptkdev-stickers#-install-free",
313+
"url": "https://github.com/ptkdev/ptkdev-stickers#-installation",
305314
"color": "#2ecc71",
306315
"label": "📱 App",
307316
"message": "Stickers",

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ indent_size = 4
1212

1313
[*.py]
1414
indent_style = space
15+
indent_size = 4
16+
17+
[*.yml]
18+
indent_style = space
1519
indent_size = 4

.github/workflows/beta.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release Beta
2+
on:
3+
push:
4+
branches:
5+
- beta
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
if: "!startsWith(github.event.head_commit.message, '[🚀 Release]')"
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
token: ${{ secrets.GIT_TOKEN }}
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: "16.x"
17+
registry-url: "https://registry.npmjs.org"
18+
- run: git config --global user.name 'Patryk Rzucidlo (@PTKDev)'
19+
- run: git config --global user.email '[email protected]'
20+
- run: npm ci
21+
- run: npm run github-workflow-next-version -- --cmd beta
22+
- run: npm run release
23+
- run: npm run pre-commit
24+
- id: pkgjson
25+
run: chmod +x ./scripts/version.sh && ./scripts/version.sh
26+
- run: git add . && git commit -m "[🚀 Release] v${{ steps.pkgjson.outputs.pkgversion }}" && git push
27+
- run: npm publish --tag beta
28+
env:
29+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
30+
- run: git fetch --all && git checkout nightly
31+
- run: npm run github-workflow-next-version -- --cmd nightly-next
32+
- run: npm run pre-commit
33+
- id: nextnightly
34+
run: chmod +x ./scripts/version.sh && ./scripts/version.sh
35+
- run: git add . && git commit -m "[🚀 Release] v${{ steps.nextnightly.outputs.pkgversion }}" && git push

.github/workflows/main.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release Stable
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
if: "!startsWith(github.event.head_commit.message, '[🚀 Release]')"
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
token: ${{ secrets.GIT_TOKEN }}
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: "16.x"
17+
registry-url: "https://registry.npmjs.org"
18+
- run: git config --global user.name 'Patryk Rzucidlo (@PTKDev)'
19+
- run: git config --global user.email '[email protected]'
20+
- run: npm ci
21+
- run: npm run github-workflow-next-version -- --cmd main
22+
- run: npm run release
23+
- run: npm run pre-commit
24+
- id: pkgjson
25+
run: chmod +x ./scripts/version.sh && ./scripts/version.sh
26+
- run: git add . && git commit -m "[🚀 Release] v${{ steps.pkgjson.outputs.pkgversion }}" && git push
27+
- run: npm publish --tag latest
28+
env:
29+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
30+
- name: Get current date
31+
id: date
32+
run: echo "::set-output name=date::$(date +'%B %d, %Y')"
33+
- run: npm run github-workflow-changelog
34+
- id: changelog
35+
run: chmod +x ./scripts/changelog_release.sh && ./scripts/changelog_release.sh
36+
- name: Release snapshot
37+
id: release-snapshot
38+
uses: actions/create-release@latest
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
tag_name: ${{ steps.pkgjson.outputs.pkgversion }}
43+
release_name: v${{ steps.pkgjson.outputs.pkgversion }}
44+
body: |
45+
### CHANGELOG: v${{ steps.pkgjson.outputs.pkgversion }} (${{ steps.date.outputs.date }})${{ steps.changelog.outputs.changelog }}
46+
draft: false
47+
prerelease: false

.github/workflows/nightly.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release Nightly
2+
on:
3+
schedule:
4+
- cron: "30 23 * * *"
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
if: "!startsWith(github.event.head_commit.message, '[🚀 Release]') || startsWith(github.event.head_commit.message, '[🚀 Release] Nightly')"
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
token: ${{ secrets.GIT_TOKEN }}
13+
ref: nightly
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: "16.x"
17+
registry-url: "https://registry.npmjs.org"
18+
- run: git config --global user.name 'Patryk Rzucidlo (@PTKDev)'
19+
- run: git config --global user.email '[email protected]'
20+
- run: npm ci
21+
- run: npm run github-workflow-next-version -- --cmd nightly
22+
- run: npm run release
23+
- run: npm run pre-commit
24+
- id: pkgjson
25+
run: chmod +x ./scripts/version.sh && ./scripts/version.sh
26+
- run: git add . && git commit -m "[🚀 Release] v${{ steps.pkgjson.outputs.pkgversion }}" && git push
27+
- run: npm publish --tag nightly
28+
env:
29+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Try Release
2+
on:
3+
push:
4+
branches:
5+
- nightly
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
if: "!startsWith(github.event.head_commit.message, '[🚀 Release]') || startsWith(github.event.head_commit.message, '[🚀 Release] Nightly')"
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
token: ${{ secrets.GIT_TOKEN }}
14+
ref: nightly
15+
- uses: actions/setup-node@v2
16+
with:
17+
node-version: "16.x"
18+
registry-url: "https://registry.npmjs.org"
19+
- run: git config --global user.name 'Patryk Rzucidlo (@PTKDev)'
20+
- run: git config --global user.email '[email protected]'
21+
- run: npm ci
22+
- run: npm run release

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,5 +124,6 @@ npm-debug.log
124124
/app/configs/config.js
125125
/app/configs/config.ts
126126
/app/configs/config.json
127+
/app/configs/version.json
127128
/dist
128129
/build

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
**/*
2-
|.github
32
!/dist/**/*
43
!/extra/**/*
54
!*.d.ts

CHANGELOG.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
# v1.0.20210930 (September 30, 2021)
1+
# v2.0.0 (January 16, 2022)
22

3-
- Security: update
4-
- Feature: translations
5-
- Fix: logs
3+
- Refactor: code quality, scripts and interfaces
4+
- Security: updated packages
5+
- Features: CI/CD
66

77
<!-- all-shields/sponsors-badges:START -->
88

99
[![Donate Paypal](https://img.shields.io/badge/donate-paypal-005EA6.svg?style=for-the-badge&logo=paypal)](https://www.paypal.me/ptkdev) [![Donate Ko-Fi](https://img.shields.io/badge/donate-ko--fi-29abe0.svg?style=for-the-badge&logo=ko-fi)](https://ko-fi.com/ptkdev) [![Donate Github Sponsors](https://img.shields.io/badge/donate-sponsors-ea4aaa.svg?style=for-the-badge&logo=github)](https://github.com/sponsors/ptkdev) [![Donate Patreon](https://img.shields.io/badge/donate-patreon-F87668.svg?style=for-the-badge&logo=patreon)](https://www.patreon.com/join/ptkdev) [![Donate Bitcoin](https://img.shields.io/badge/BTC-35jQmZCy4nsxoMM3QPFrnZePDVhdKaHMRH-E38B29.svg?style=flat-square&logo=bitcoin)](https://ptk.dev/img/icons/menu/bitcoin_wallet.png) [![Donate Ethereum](https://img.shields.io/badge/ETH-0x8b8171661bEb032828e82baBb0B5B98Ba8fBEBFc-4E8EE9.svg?style=flat-square&logo=ethereum)](https://ptk.dev/img/icons/menu/ethereum_wallet.png)
1010

1111
<!-- all-shields/sponsors-badges:END -->
1212

13+
# v1.0.20210930 (September 30, 2021)
14+
15+
- Security: update
16+
- Feature: translations
17+
- Fix: logs
18+
1319
# v1.0.20210404 (April 04, 2021)
1420

1521
- Feature: Setup

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<!-- all-shields/header-badges:START -->
44

5-
[![v1.0.20210930](https://img.shields.io/badge/version-v1.0.20210930-lightgray.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/blob/main/CHANGELOG.md) [![](https://img.shields.io/npm/v/@ptkdev/node-cli-boilerplate?color=CC3534&logo=npm)](https://www.npmjs.com/package/@ptkdev/node-cli-boilerplate) [![License: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat&logo=license)](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/blob/main/LICENSE.md) [![Language: TypeScript](https://img.shields.io/badge/language-typescript-blue.svg?style=flat&logo=typescript)](https://www.typescriptlang.org/) [![ECMAScript: 2019](https://img.shields.io/badge/ES-9-F7DF1E.svg?style=flat&logo=javascript)](https://github.com/tc39/ecma262) [![Discord Server](https://discordapp.com/api/guilds/383373985666301975/embed.png)](https://discord.ptkdev.io)
5+
[![v2.0.0-nightly.0](https://img.shields.io/badge/version-v2.0.0--nightly.0-lightgray.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/blob/main/CHANGELOG.md) [![](https://img.shields.io/npm/v/@ptkdev/node-cli-boilerplate?color=CC3534&logo=npm)](https://www.npmjs.com/package/@ptkdev/node-cli-boilerplate) [![License: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat&logo=license)](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/blob/main/LICENSE.md) [![Language: TypeScript](https://img.shields.io/badge/language-typescript-blue.svg?style=flat&logo=typescript)](https://www.typescriptlang.org/) [![ECMAScript: 2019](https://img.shields.io/badge/ES-9-F7DF1E.svg?style=flat&logo=javascript)](https://github.com/tc39/ecma262) [![Discord Server](https://discordapp.com/api/guilds/383373985666301975/embed.png)](https://discord.ptkdev.io)
66

77
<!-- all-shields/header-badges:END -->
88

9-
Create node cli with this friendly boilerplate. Use this respository as template for your new node command line interface project
9+
Create node cli with this user friendly boilerplate. Use this respository as template for your new npm command line interface project
1010

1111
This is a [github template](https://github.blog/2019-06-06-generate-new-repositories-with-repository-templates/), you can fork it or [use as template](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/generate) for start new project with this repository as hello-world. I hate start new project with empty template, often i missing correct configuration, readme instruction or i need of samples of code. Use this repository as template solve this problem.
1212

@@ -62,9 +62,10 @@ You can use npx, example: `npx @ptkdev/node-cli-boilerplate`
6262
#### 🏁 Run Project
6363

6464
1. Clone this repository or download [nightly](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/archive/nightly.zip), [beta](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/archive/beta.zip) or [stable](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/archive/main.zip).
65-
2. Run `npm run init`
66-
3. Run `npm run build && npm run link` (unix require `sudo`)
67-
4. Run `node-cli-boilerplate` anywhere for execute command line tool
65+
2. Run `npm install`
66+
3. Run `npm run build`
67+
4. Run `npm run link`
68+
5. Run `node-cli-boilerplate` anywhere for execute command line tool
6869

6970
or run `npm run dev` for watch mode.
7071

@@ -84,7 +85,7 @@ Thanks to all our backers! 🙏 Donate 3$ or more on [paypal](https://www.paypal
8485

8586
## 👨‍💻 Contributing
8687

87-
I ❤️ contributions! I will happily accept your pull request! Translations, grammatical corrections (GrammarNazi you are welcome! Yes my English is bad, sorry), etc... Do not be afraid, if the code is not perfect we will work together 👯 and remember to insert your name in `.all-contributorsrc` and `package.json` file.
88+
I ❤️ contributions! I will happily accept your pull request! (**IMPORTANT**: Only nightly branch!) Translations, grammatical corrections (GrammarNazi you are welcome! Yes my English is bad, sorry), etc... Do not be afraid, if the code is not perfect we will work together 👯 and remember to insert your name in `.all-contributorsrc` and `package.json` file.
8889

8990
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
9091

@@ -120,13 +121,13 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
120121

121122
<!-- all-shields/projects-badges3:START -->
122123

123-
[![](https://img.shields.io/badge/%F0%9F%93%B8%20WebComponent-Instagram%20Widget-e74c3c.svg?style=flat&logo=)](https://github.com/ptkdev-components/webcomponent-instagram-widget) [![](https://img.shields.io/badge/%F0%9F%91%91%20WebComponent-My%20Patreon%20Box-e74c3c.svg?style=flat&logo=)](https://github.com/ptkdev-components/webcomponent-patreon-box) [![](https://img.shields.io/badge/%F0%9F%8F%9E%20WebComponent-Carousel%20Slideshow-e74c3c.svg?style=flat&logo=)](https://github.com/ptkdev-components/webcomponent-carousel-slideshow)
124+
[![](https://img.shields.io/badge/%F0%9F%9A%A7%20WebComponents-My%20Collection-e74c3c.svg?style=flat&logo=)](https://github.com/ptkdev-components) [![](https://img.shields.io/badge/%F0%9F%94%96%20Bot-AboutMeInfo-1FA0F2.svg?style=flat&logo=)](https://github.com/ptkdev/aboutmeinfo-telegram-bot) [![](https://img.shields.io/badge/%E2%8F%B1%20Bot-QuizQuickAnswer-FEC91A.svg?style=flat&logo=)](https://github.com/ptkdev/quizquickanswer-telegram-game-bot) [![](https://img.shields.io/badge/%F0%9F%93%9A%20Bot-GameBookChat-34495e.svg?style=flat&logo=)](https://t.me/gamebookchatbot) [![](https://img.shields.io/badge/%F0%9F%8E%A8%20Themes-VSCode-f1c40f.svg?style=flat&logo=)](https://github.com/ptkdev/vscode-theme-dark-blood) [![](https://img.shields.io/badge/%F0%9F%97%84%20Sourcesense-Joyce-CECBE6.svg?style=flat&logo=)](https://github.com/sourcesense/joyce)
124125

125126
<!-- all-shields/projects-badges3:END -->
126127

127128
<!-- all-shields/projects-badges4:START -->
128129

129-
[![](https://img.shields.io/badge/%F0%9F%8E%A8%20Themes-VSCode-f1c40f.svg?style=flat&logo=)](https://github.com/ptkdev/vscode-theme-dark-blood) [![](https://img.shields.io/badge/%F0%9F%93%9A%20Bot-GameBookChat-34495e.svg?style=flat&logo=)](https://t.me/gamebookchatbot) [![](https://img.shields.io/badge/%F0%9F%91%94%20Boilerplate-Svelte-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=svelte) [![](https://img.shields.io/badge/%F0%9F%91%94%20Boilerplate-WebComponents-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=webcomponent) [![](https://img.shields.io/badge/%F0%9F%91%94%20Boilerplate-BOT-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=bot) [![](https://img.shields.io/badge/%F0%9F%91%94%20Boilerplate-Node-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=node) [![](https://img.shields.io/badge/%F0%9F%92%85%20App-Me%20in%20Gifs-2ecc71.svg?style=flat&logo=)](https://meingifs.pics/) [![](https://img.shields.io/badge/%F0%9F%93%B1%20App-Stickers-2ecc71.svg?style=flat&logo=)](https://github.com/ptkdev/ptkdev-stickers#-install-free)
130+
[![](https://img.shields.io/badge/%F0%9F%91%94%20Boilerplate-Svelte-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=svelte) [![](https://img.shields.io/badge/%F0%9F%91%94%20Boilerplate-WebComponents-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=webcomponent) [![](https://img.shields.io/badge/%F0%9F%91%94%20Boilerplate-BOT-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=bot) [![](https://img.shields.io/badge/%F0%9F%91%94%20Boilerplate-Node-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=node) [![](https://img.shields.io/badge/%F0%9F%92%85%20App-Me%20in%20Gifs-2ecc71.svg?style=flat&logo=)](https://meingifs.pics/) [![](https://img.shields.io/badge/%F0%9F%93%B1%20App-Stickers-2ecc71.svg?style=flat&logo=)](https://github.com/ptkdev/ptkdev-stickers#-installation)
130131

131132
<!-- all-shields/projects-badges4:END -->
132133

0 commit comments

Comments
 (0)