Skip to content

Commit

Permalink
[Refactor] Code quality, scripts, and interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ptkdev committed Feb 7, 2022
1 parent e905426 commit 3956eaf
Show file tree
Hide file tree
Showing 38 changed files with 16,388 additions and 24,124 deletions.
55 changes: 32 additions & 23 deletions .all-shieldsrc
Original file line number Diff line number Diff line change
Expand Up @@ -216,37 +216,41 @@
"id": "projects-badges3",
"badges": [
{
"url": "https://github.com/ptkdev-components/webcomponent-instagram-widget",
"url": "https://github.com/ptkdev-components",
"color": "#e74c3c",
"label": "📸 WebComponent",
"message": "Instagram Widget",
"label": "🚧 WebComponents",
"message": "My Collection",
"style": "flat",
"logo": "",
"platform": "shields"
},
{
"url": "https://github.com/ptkdev-components/webcomponent-patreon-box",
"color": "#e74c3c",
"label": "👑 WebComponent",
"message": "My Patreon Box",
"url": "https://github.com/ptkdev/aboutmeinfo-telegram-bot",
"color": "#1FA0F2",
"label": "🔖 Bot",
"message": "AboutMeInfo",
"style": "flat",
"logo": "",
"platform": "shields"
},
{
"url": "https://github.com/ptkdev-components/webcomponent-carousel-slideshow",
"color": "#e74c3c",
"label": "🏞 WebComponent",
"message": "Carousel Slideshow",
"url": "https://github.com/ptkdev/quizquickanswer-telegram-game-bot",
"color": "#FEC91A",
"label": "⏱ Bot",
"message": "QuizQuickAnswer",
"style": "flat",
"logo": "",
"platform": "shields"
}
]
},
{
"id": "projects-badges4",
"badges": [
},
{
"url": "https://t.me/gamebookchatbot",
"color": "#34495e",
"label": "📚 Bot",
"message": "GameBookChat",
"style": "flat",
"logo": "",
"platform": "shields"
},
{
"url": "https://github.com/ptkdev/vscode-theme-dark-blood",
"color": "#f1c40f",
Expand All @@ -257,14 +261,19 @@
"platform": "shields"
},
{
"url": "https://t.me/gamebookchatbot",
"color": "#34495e",
"label": "📚 Bot",
"message": "GameBookChat",
"url": "https://github.com/sourcesense/joyce",
"color": "#CECBE6",
"label": "🗄 Sourcesense",
"message": "Joyce",
"style": "flat",
"logo": "",
"platform": "shields"
},
}
]
},
{
"id": "projects-badges4",
"badges": [
{
"url": "https://github.com/ptkdev-boilerplate?q=svelte",
"color": "#f368e0",
Expand Down Expand Up @@ -311,7 +320,7 @@
"platform": "shields"
},
{
"url": "https://github.com/ptkdev/ptkdev-stickers#-install-free",
"url": "https://github.com/ptkdev/ptkdev-stickers#-installation",
"color": "#2ecc71",
"label": "📱 App",
"message": "Stickers",
Expand Down
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ indent_size = 4

[*.py]
indent_style = space
indent_size = 4

[*.yml]
indent_style = space
indent_size = 4
35 changes: 35 additions & 0 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release Beta
on:
push:
branches:
- beta
jobs:
build:
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, '[🚀 Release Beta]')"
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GIT_TOKEN }}
- uses: actions/setup-node@v2
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: git config --global user.name 'Patryk Rzucidlo (@PTKDev)'
- run: git config --global user.email 'support@ptkdev.io'
- run: npm ci
- run: npm run github-workflow-next-version -- --cmd beta
- run: npm run release
- run: npm run pre-commit
- id: pkgjson
run: chmod +x ./scripts/version.sh && ./scripts/version.sh
- run: git add . && git commit -m "[🚀 Release Beta] v${{ steps.pkgjson.outputs.pkgversion }}" && git push
- run: npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: git fetch --all && git checkout nightly
- run: npm run github-workflow-next-version -- --cmd nightly-next
- run: npm run pre-commit
- id: nextnightly
run: chmod +x ./scripts/version.sh && ./scripts/version.sh
- run: git add . && git commit -m "[🚀 Release Nightly] v${{ steps.nextnightly.outputs.pkgversion }}" && git push
47 changes: 47 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release Stable
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, '[🚀 Release]')"
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GIT_TOKEN }}
- uses: actions/setup-node@v2
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: git config --global user.name 'Patryk Rzucidlo (@PTKDev)'
- run: git config --global user.email 'support@ptkdev.io'
- run: npm ci
- run: npm run github-workflow-next-version -- --cmd main
- run: npm run release
- run: npm run pre-commit
- id: pkgjson
run: chmod +x ./scripts/version.sh && ./scripts/version.sh
- run: git add . && git commit -m "[🚀 Release] v${{ steps.pkgjson.outputs.pkgversion }}" && git push
- run: npm publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%B %d, %Y')"
- run: npm run github-workflow-changelog
- id: changelog
run: chmod +x ./scripts/changelog_release.sh && ./scripts/changelog_release.sh
- name: Release snapshot
id: release-snapshot
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.pkgjson.outputs.pkgversion }}
release_name: v${{ steps.pkgjson.outputs.pkgversion }}
body: |
### CHANGELOG: v${{ steps.pkgjson.outputs.pkgversion }} (${{ steps.date.outputs.date }})${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
29 changes: 29 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release Nightly
on:
schedule:
- cron: "30 23 * * *"
jobs:
build:
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, '[🚀 Release Nightly]')"
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GIT_TOKEN }}
ref: nightly
- uses: actions/setup-node@v2
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: git config --global user.name 'Patryk Rzucidlo (@PTKDev)'
- run: git config --global user.email 'support@ptkdev.io'
- run: npm ci
- run: npm run github-workflow-next-version -- --cmd nightly
- run: npm run release
- run: npm run pre-commit
- id: pkgjson
run: chmod +x ./scripts/version.sh && ./scripts/version.sh
- run: git add . && git commit -m "[🚀 Release Nightly] v${{ steps.pkgjson.outputs.pkgversion }}" && git push
- run: npm publish --tag nightly
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Try Release
on:
push:
branches:
- nightly
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GIT_TOKEN }}
ref: nightly
- uses: actions/setup-node@v2
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: git config --global user.name 'Patryk Rzucidlo (@PTKDev)'
- run: git config --global user.email 'support@ptkdev.io'
- run: npm ci
- run: npm run release
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ npm-debug.log

# App #
#######
.env
/app/configs/config.js
/app/configs/config.ts
/app/configs/config.json
/app/configs/version.json
/extra
/dist
/build
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
**/*
|.github
!/dist/**/*
!/extra/**/*
!*.d.ts
Expand Down
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# v1.0.20210412 (April 12, 2021)
# v2.0.0 (February 07, 2022)

- Fix: minor fix
- Fix: readme of issues
- Refactor: code quality, scripts, and interfaces
- Security: updated packages
- Features: CI/CD

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

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

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

# v1.0.20210412 (April 12, 2021)

- Fix: minor fix
- Fix: readme of issues

# v1.0.20210402 (April 02, 2021)

- First release
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

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

[![v1.0.20210412](https://img.shields.io/badge/version-v1.0.20210412-lightgray.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate/svelte-spa-boilerplate/blob/main/CHANGELOG.md) [![](https://img.shields.io/npm/v/@ptkdev/svelte-spa-boilerplate?color=CC3534&logo=npm)](https://www.npmjs.com/package/@ptkdev/svelte-spa-boilerplate) [![License: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat&logo=license)](https://github.com/ptkdev-boilerplate/svelte-spa-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)
[![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-spa-boilerplate/blob/main/CHANGELOG.md) [![](https://img.shields.io/npm/v/@ptkdev/svelte-spa-boilerplate?color=CC3534&logo=npm)](https://www.npmjs.com/package/@ptkdev/svelte-spa-boilerplate) [![License: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat&logo=license)](https://github.com/ptkdev-boilerplate/svelte-spa-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)

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

Create single page application with this friendly Svelte boilerplate made with typescript and love
Create single page application with this user-friendly Svelte boilerplate made with typescript and love

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-spa-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.

Expand Down Expand Up @@ -43,17 +43,17 @@ This is a [github template](https://github.blog/2019-06-06-generate-new-reposito
- [✔️] Browser sync, auto refresh, auto reload
- [✔️] Dark mode
- [✔️] 100% on Google Speedpage
- [✔️] Friendly boilerplate + Github templates
- [✔️] User-friendly boilerplate + Github templates
- [✔️] Powered by svelte framework
- [✔️] Without jQuery depencence
- [✔️] Typescript + TSPaths preconfigured
- [✔️] Userfriendly folders tree
- [✔️] User-friendly folders tree
- [✔️] Prettiers and ESLint preconfigured
- [✔️] all-contributors-cli and all-shields-cli preconfigured
- [✔️] JEST Test preconfigured
- [✔️] Full async code
- [✔️] Github and Vscode dotfiles preconfigured
- [✔️] Translations i18n: 🇬🇧 🇮🇹 🇵🇱 (Help me ❤️)
- [✔️] Translations i18n (Help me ❤️)

### 🔖 TODO

Expand All @@ -69,7 +69,7 @@ This is a [github template](https://github.blog/2019-06-06-generate-new-reposito
#### 🏁 Run Project

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

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

## 👨‍💻 Contributing

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.
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.

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

Expand Down Expand Up @@ -125,13 +125,13 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d

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

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

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

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

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

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

Expand Down
4 changes: 2 additions & 2 deletions app/components/common/footer/footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
*
*/
import "./footer.ts";
import { translate } from "@app/translations/translate";
</script>

<footer class="footer">
<div class="content has-text-centered">
<p>
The source code is licensed
<a href="http://opensource.org/licenses/mit-license.php">MIT</a>.
{translate("footer_license")} <a href="http://opensource.org/licenses/mit-license.php">MIT</a>.
</p>
</div>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion app/components/common/menu/menu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import "./menu.ts";
</script>

<nav class="navbar" role="navigation" aria-label="main navigation">
<nav class="navbar" aria-label="main navigation">
<div class="navbar-brand">
<a href="#/" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbar-basic">
<span aria-hidden="true" />
Expand Down
Loading

0 comments on commit 3956eaf

Please sign in to comment.