Skip to content

Commit 130cc16

Browse files
committed
[Refactor] Updated code quality
1 parent f699522 commit 130cc16

35 files changed

+16388
-24337
lines changed

.all-shieldsrc

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -216,37 +216,41 @@
216216
"id": "projects-badges3",
217217
"badges": [
218218
{
219-
"url": "https://github.com/ptkdev-components/webcomponent-instagram-widget",
219+
"url": "https://github.com/ptkdev-components",
220220
"color": "#e74c3c",
221-
"label": "📸 WebComponent",
222-
"message": "Instagram Widget",
221+
"label": "🚧 WebComponents",
222+
"message": "My Collection",
223223
"style": "flat",
224224
"logo": "",
225225
"platform": "shields"
226226
},
227227
{
228-
"url": "https://github.com/ptkdev-components/webcomponent-patreon-box",
229-
"color": "#e74c3c",
230-
"label": "👑 WebComponent",
231-
"message": "My Patreon Box",
228+
"url": "https://github.com/ptkdev/aboutmeinfo-telegram-bot",
229+
"color": "#1FA0F2",
230+
"label": "🔖 Bot",
231+
"message": "AboutMeInfo",
232232
"style": "flat",
233233
"logo": "",
234234
"platform": "shields"
235235
},
236236
{
237-
"url": "https://github.com/ptkdev-components/webcomponent-carousel-slideshow",
238-
"color": "#e74c3c",
239-
"label": "🏞 WebComponent",
240-
"message": "Carousel Slideshow",
237+
"url": "https://github.com/ptkdev/quizquickanswer-telegram-game-bot",
238+
"color": "#FEC91A",
239+
"label": "⏱ Bot",
240+
"message": "QuizQuickAnswer",
241241
"style": "flat",
242242
"logo": "",
243243
"platform": "shields"
244-
}
245-
]
246-
},
247-
{
248-
"id": "projects-badges4",
249-
"badges": [
244+
},
245+
{
246+
"url": "https://t.me/gamebookchatbot",
247+
"color": "#34495e",
248+
"label": "📚 Bot",
249+
"message": "GameBookChat",
250+
"style": "flat",
251+
"logo": "",
252+
"platform": "shields"
253+
},
250254
{
251255
"url": "https://github.com/ptkdev/vscode-theme-dark-blood",
252256
"color": "#f1c40f",
@@ -257,14 +261,19 @@
257261
"platform": "shields"
258262
},
259263
{
260-
"url": "https://t.me/gamebookchatbot",
261-
"color": "#34495e",
262-
"label": "📚 Bot",
263-
"message": "GameBookChat",
264+
"url": "https://github.com/sourcesense/joyce",
265+
"color": "#CECBE6",
266+
"label": "🗄 Sourcesense",
267+
"message": "Joyce",
264268
"style": "flat",
265269
"logo": "",
266270
"platform": "shields"
267-
},
271+
}
272+
]
273+
},
274+
{
275+
"id": "projects-badges4",
276+
"badges": [
268277
{
269278
"url": "https://github.com/ptkdev-boilerplate?q=svelte",
270279
"color": "#f368e0",
@@ -311,7 +320,7 @@
311320
"platform": "shields"
312321
},
313322
{
314-
"url": "https://github.com/ptkdev/ptkdev-stickers#-install-free",
323+
"url": "https://github.com/ptkdev/ptkdev-stickers#-installation",
315324
"color": "#2ecc71",
316325
"label": "📱 App",
317326
"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 Beta]')"
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 Beta] 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 Nightly] 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 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 Nightly] 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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Try Release
2+
on:
3+
push:
4+
branches:
5+
- nightly
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
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 release

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ npm-debug.log
121121

122122
# App #
123123
#######
124+
.env
124125
/app/configs/config.js
125126
/app/configs/config.ts
126127
/app/configs/config.json
128+
/app/configs/version.json
127129
/extra
128130
/dist
129131
/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: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
# v1.0.20210430 (April 30, 2021)
1+
# v2.0.0 (January 20, 2022)
22

3-
- Fix: typescript implicit any
3+
- Refactor: code quality, scripts and interfaces
4+
- Security: updated packages
5+
- Features: CI/CD
46

57
<!-- all-shields/sponsors-badges:START -->
68

79
[![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)
810

911
<!-- all-shields/sponsors-badges:END -->
1012

13+
# v1.0.20210430 (April 30, 2021)
14+
15+
- Fix: typescript implicit any
16+
1117
# v1.0.20210412 (April 12, 2021)
1218

1319
- Fix: minor fix

README.md

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

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

5-
[![v1.0.20210430](https://img.shields.io/badge/version-v1.0.20210430-lightgray.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate/svelte-webcomponent-boilerplate/blob/main/CHANGELOG.md) [![](https://img.shields.io/npm/v/@ptkdev/svelte-webcomponent-boilerplate?color=CC3534&logo=npm)](https://www.npmjs.com/package/@ptkdev/svelte-webcomponent-boilerplate) [![License: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat&logo=license)](https://github.com/ptkdev-boilerplate/svelte-webcomponent-boilerplate/blob/main/LICENSE.md) [![Powered By Svelte](https://img.shields.io/badge/powered%20by-svelte-FF3C02.svg?style=flat&logo=svelte)](https://svelte.dev/) [![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/svelte-webcomponent-boilerplate/blob/main/CHANGELOG.md) [![](https://img.shields.io/npm/v/@ptkdev/svelte-webcomponent-boilerplate?color=CC3534&logo=npm)](https://www.npmjs.com/package/@ptkdev/svelte-webcomponent-boilerplate) [![License: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat&logo=license)](https://github.com/ptkdev-boilerplate/svelte-webcomponent-boilerplate/blob/main/LICENSE.md) [![Powered By Svelte](https://img.shields.io/badge/powered%20by-svelte-FF3C02.svg?style=flat&logo=svelte)](https://svelte.dev/) [![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 your HTML5 Web Component with Svelte. Made your web components with this friendly boilerplate.
9+
Create your HTML5 Web Component with Svelte. Made your web components with this user friendly boilerplate.
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/svelte-webcomponent-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

@@ -65,7 +65,7 @@ This is a [github template](https://github.blog/2019-06-06-generate-new-reposito
6565
- [✔️] JEST Test preconfigured
6666
- [✔️] Full async code
6767
- [✔️] Github and Vscode dotfiles preconfigured
68-
- [✔️] Translations i18n: 🇬🇧 🇮🇹 🇵🇱 (Help me ❤️)
68+
- [✔️] Translations i18n (Help me ❤️)
6969

7070
## 👔 Screenshot
7171

@@ -253,7 +253,7 @@ Part attribute is, generally, suffix of a class. Use chrome inspector for get th
253253
#### 🏁 Run Project
254254

255255
1. Clone this repository or download [nightly](https://github.com/ptkdev-boilerplate/svelte-webcomponent-boilerplate/archive/nightly.zip), [beta](https://github.com/ptkdev-boilerplate/svelte-webcomponent-boilerplate/archive/beta.zip) or [stable](https://github.com/ptkdev-boilerplate/svelte-webcomponent-boilerplate/archive/main.zip).
256-
2. Run `npm run init`
256+
2. Run `npm install`
257257
3. Run `npm run dev`
258258
4. Run `http://localhost:5000`
259259

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

274274
## 👨‍💻 Contributing
275275

276-
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.
276+
I ❤️ contributions! I will happily accept your pull request! (**IMPORTANT**: Only to 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.
277277

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

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

310310
<!-- all-shields/projects-badges3:START -->
311311

312-
[![](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)
312+
[![](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)
313313

314314
<!-- all-shields/projects-badges3:END -->
315315

316316
<!-- all-shields/projects-badges4:START -->
317317

318-
[![](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)
318+
[![](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)
319319

320320
<!-- all-shields/projects-badges4:END -->
321321

0 commit comments

Comments
 (0)