├── .gitmodules ├── .husky ├── .gitignore └── pre-commit ├── .eslintignore ├── .prettierignore ├── .github ├── FUNDING.yml ├── assets │ ├── screenshot.png │ ├── social_discord.png │ ├── social_twitter.png │ └── social_telegram.png ├── ISSUE_TEMPLATE │ ├── question.md │ ├── paid_support.md │ ├── feature_request.md │ └── bug_report.md └── workflows │ ├── release.yml │ ├── nightly.yml │ ├── beta.yml │ └── main.yml ├── .npmignore ├── jsconfig.json ├── assets ├── icon.png └── favicon.png ├── jest.config.js ├── .prettierrc ├── scripts ├── version.sh ├── changelog_release.sh ├── rmdist.ts ├── configs.ts ├── debug.ts ├── changelog.ts ├── changelog_release.ts ├── githash.ts ├── version.ts └── setup.ts ├── app ├── pages │ ├── 404 │ │ ├── 404.scss │ │ ├── 404.ts │ │ └── 404.svelte │ ├── home │ │ ├── home.scss │ │ ├── home.ts │ │ └── home.svelte │ ├── wild │ │ ├── wild.scss │ │ ├── wild.ts │ │ └── wild.svelte │ ├── offline │ │ ├── offline.scss │ │ ├── offline.ts │ │ └── offline.svelte │ └── index │ │ ├── index.ts │ │ ├── index.svelte │ │ └── index.scss ├── components │ └── common │ │ ├── menu │ │ ├── menu.scss │ │ ├── menu.ts │ │ └── menu.svelte │ │ ├── footer │ │ ├── footer.scss │ │ ├── footer.ts │ │ └── footer.svelte │ │ └── darkmode │ │ ├── darkmode.svelte │ │ ├── darkmode.scss │ │ └── darkmode.ts ├── types │ ├── global.interfaces.ts │ └── translate.interfaces.ts ├── core │ └── init.ts ├── routes │ ├── pages.ts │ └── translations.ts ├── tests │ └── darkmode.test.ts ├── configs │ └── config.js.tpl └── translations │ ├── en.json │ ├── it.json │ └── translate.ts ├── .vscode ├── extensions.json └── settings.json ├── electron ├── renderer.ts ├── tsconfig.json ├── preload.ts └── main.ts ├── .editorconfig ├── .all-contributorsrc ├── public └── index.html ├── setup.json ├── tsconfig.json ├── CHANGELOG.md ├── .gitignore ├── .eslintrc.cjs ├── LICENSE.md ├── .gitattributes ├── rollup.config.js ├── package.json ├── .all-shieldsrc └── README.md /.gitmodules: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /examples -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /build 3 | /node_modules 4 | package-lock.json -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [ptkdev] 2 | patreon: ptkdev 3 | ko_fi: ptkdev 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | **/* 2 | !/dist/**/* 3 | !/extra/**/* 4 | !*.d.ts 5 | !*.md 6 | !*.json -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["node_modules"], 3 | "include": ["**/*.js"] 4 | } 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npm run pre-commit 5 | -------------------------------------------------------------------------------- /assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ptkdev-boilerplate/svelte-electron-boilerplate/HEAD/assets/icon.png -------------------------------------------------------------------------------- /assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ptkdev-boilerplate/svelte-electron-boilerplate/HEAD/assets/favicon.png -------------------------------------------------------------------------------- /.github/assets/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ptkdev-boilerplate/svelte-electron-boilerplate/HEAD/.github/assets/screenshot.png -------------------------------------------------------------------------------- /.github/assets/social_discord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ptkdev-boilerplate/svelte-electron-boilerplate/HEAD/.github/assets/social_discord.png -------------------------------------------------------------------------------- /.github/assets/social_twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ptkdev-boilerplate/svelte-electron-boilerplate/HEAD/.github/assets/social_twitter.png -------------------------------------------------------------------------------- /.github/assets/social_telegram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ptkdev-boilerplate/svelte-electron-boilerplate/HEAD/.github/assets/social_telegram.png -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: "ts-jest", 3 | testEnvironment: "jsdom", 4 | globals: { 5 | "ts-jest": { 6 | tsconfig: "tsconfig.json", 7 | }, 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "bracketSpacing": true, 3 | "printWidth": 120, 4 | "semi": true, 5 | "singleQuote": false, 6 | "tabWidth": 4, 7 | "trailingComma": "all", 8 | "useTabs": true 9 | } 10 | -------------------------------------------------------------------------------- /scripts/version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | PACKAGE_VERSION=$(cat ./package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]') 3 | echo ::set-output name=pkgversion::$PACKAGE_VERSION -------------------------------------------------------------------------------- /app/pages/home/home.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Home SCSS 3 | * ===================== 4 | * 5 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 6 | * 7 | * @license: MIT License 8 | * 9 | */ 10 | -------------------------------------------------------------------------------- /app/pages/wild/wild.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Wild SCSS 3 | * ===================== 4 | * 5 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 6 | * 7 | * @license: MIT License 8 | * 9 | */ 10 | -------------------------------------------------------------------------------- /app/pages/404/404.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Not Found SCSS 3 | * ===================== 4 | * 5 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 6 | * 7 | * @license: MIT License 8 | * 9 | */ 10 | -------------------------------------------------------------------------------- /app/components/common/menu/menu.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Menu CSS 3 | * ===================== 4 | * 5 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 6 | * 7 | * @license: MIT License 8 | * 9 | */ 10 | -------------------------------------------------------------------------------- /app/pages/offline/offline.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Offline SCSS 3 | * ===================== 4 | * 5 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 6 | * 7 | * @license: MIT License 8 | * 9 | */ 10 | -------------------------------------------------------------------------------- /app/components/common/footer/footer.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Footer CSS 3 | * ===================== 4 | * 5 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 6 | * 7 | * @license: MIT License 8 | * 9 | */ 10 | -------------------------------------------------------------------------------- /scripts/changelog_release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | CHANGELOG=$(cat ./CHANGELOG_RELEASE.txt) 3 | CHANGELOG="${CHANGELOG//'%'/'%25'}" 4 | CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" 5 | CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" 6 | echo ::set-output name=changelog::$CHANGELOG -------------------------------------------------------------------------------- /app/pages/offline/offline.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Offline Typescript 3 | * ===================== 4 | * 5 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 6 | * 7 | * @license: MIT License 8 | * 9 | */ 10 | export {}; 11 | -------------------------------------------------------------------------------- /app/components/common/menu/menu.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Footer Typescript 3 | * ===================== 4 | * 5 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 6 | * 7 | * @license: MIT License 8 | * 9 | */ 10 | export {}; 11 | -------------------------------------------------------------------------------- /app/pages/home/home.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Home Route 3 | * ===================== 4 | * Svelte Page 5 | * 6 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 7 | * 8 | * @license: MIT License 9 | * 10 | */ 11 | export {}; 12 | -------------------------------------------------------------------------------- /app/pages/wild/wild.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Wild Route 3 | * ===================== 4 | * Svelte Page 5 | * 6 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 7 | * 8 | * @license: MIT License 9 | * 10 | */ 11 | export {}; 12 | -------------------------------------------------------------------------------- /app/components/common/footer/footer.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Footer Typescript 3 | * ===================== 4 | * 5 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 6 | * 7 | * @license: MIT License 8 | * 9 | */ 10 | export {}; 11 | -------------------------------------------------------------------------------- /app/pages/404/404.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Not Found Route 3 | * ===================== 4 | * Svelte Page 5 | * 6 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 7 | * 8 | * @license: MIT License 9 | * 10 | */ 11 | export {}; 12 | -------------------------------------------------------------------------------- /app/pages/index/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Global Functions 3 | * ===================== 4 | * Typescript global code 5 | * 6 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 7 | * 8 | * @license: MIT License 9 | * 10 | */ 11 | export {}; 12 | -------------------------------------------------------------------------------- /app/types/global.interfaces.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Typescript @Types 3 | * ===================== 4 | * Global typings 5 | * 6 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 7 | * 8 | * @license: MIT License 9 | * 10 | */ 11 | 12 | export {}; 13 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "ptkdev.dark-blood-theme", 4 | "naumovs.color-highlight", 5 | "svelte.svelte-vscode", 6 | "esbenp.prettier-vscode", 7 | "dbaeumer.vscode-eslint", 8 | "gruntfuggly.todo-tree", 9 | "nickdodd79.gulptasks" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /electron/renderer.ts: -------------------------------------------------------------------------------- 1 | // This file is required by the index.html file and will 2 | // be executed in the renderer process for that window. 3 | // No Node.js APIs are available in this process unless 4 | // nodeIntegration is set to true in webPreferences. 5 | // Use preload.js to selectively enable features 6 | // needed in the renderer process. 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🗨 Question 3 | about: Ask a question (we recommended use 💬 discussion tab and open questions on repository forum) 4 | --- 5 | 6 | 7 | 8 | ### Question 9 | 10 | 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | insert_final_newline = false 9 | trim_trailing_whitespace = true 10 | indent_style = tab 11 | indent_size = 4 12 | 13 | [*.py] 14 | indent_style = space 15 | indent_size = 4 16 | 17 | [*.yml] 18 | indent_style = space 19 | indent_size = 4 -------------------------------------------------------------------------------- /app/core/init.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Svelte Init 3 | * ===================== 4 | * Create svelte app 5 | * 6 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 7 | * 8 | * @license: MIT License 9 | * 10 | */ 11 | import App from "@app/pages/index/index.svelte"; 12 | 13 | const app = new App({ 14 | target: document.body, 15 | }); 16 | 17 | export default app; 18 | -------------------------------------------------------------------------------- /electron/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "CommonJS", 4 | "target": "ES6", 5 | "sourceMap": true, 6 | "outDir": "../dist/electron", 7 | "baseUrl": ".", 8 | "allowJs": true, 9 | "moduleResolution": "node" 10 | }, 11 | "include": ["**/*.ts", "../app/configs/config.js"], 12 | "exclude": ["../node_modules/*", "../dist/*", "../scripts/*", "../examples/*"] 13 | } 14 | -------------------------------------------------------------------------------- /app/types/translate.interfaces.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Translate Interface 3 | * ===================== 4 | * 5 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 6 | * 7 | * @license: MIT License 8 | * 9 | */ 10 | 11 | /** 12 | * Translate Interface 13 | * ===================== 14 | * 15 | */ 16 | export interface TranslateParamsInterface { 17 | app_name?: string; 18 | name?: string; 19 | param?: string; 20 | } 21 | -------------------------------------------------------------------------------- /scripts/rmdist.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Delete dist folder 3 | * ===================== 4 | * 5 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 6 | * 7 | * @license: MIT License 8 | * 9 | */ 10 | import * as shell from "shelljs"; 11 | declare const __dirname: string; 12 | 13 | const path_dist = `${__dirname}/../dist`; 14 | const path_build = `${__dirname}/../build`; 15 | 16 | shell.rm("-Rf", path_dist); 17 | shell.rm("-Rf", path_build); 18 | -------------------------------------------------------------------------------- /app/routes/pages.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Routes 3 | * ===================== 4 | * All app routes 5 | * 6 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 7 | * 8 | * @license: MIT License 9 | * 10 | */ 11 | import Home from "@app/pages/home/home.svelte"; 12 | import Wild from "@app/pages/wild/wild.svelte"; 13 | import NotFound from "@app/pages/404/404.svelte"; 14 | 15 | export default { 16 | "/": Home, 17 | "/wild": Wild, 18 | "/wild/*": Wild, 19 | "*": NotFound, 20 | }; 21 | -------------------------------------------------------------------------------- /app/tests/darkmode.test.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Jest Tests 3 | * ===================== 4 | * 5 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 6 | * 7 | * @license: MIT License 8 | * 9 | */ 10 | import { darkModeToggle, darkModeDetect } from "@components/common/darkmode/darkmode"; 11 | 12 | test("darkModeToggle", async () => { 13 | expect(darkModeToggle()).toBe(true || false); 14 | }); 15 | 16 | test("darkModeDetect", async () => { 17 | expect(darkModeDetect()).toBe(true || false); 18 | }); 19 | -------------------------------------------------------------------------------- /app/routes/translations.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Translations 3 | * ===================== 4 | * Switch translations 5 | * 6 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 7 | * 8 | * @license: MIT License 9 | * 10 | */ 11 | import en from "@translations/en.json"; 12 | import it from "@translations/it.json"; 13 | 14 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 15 | const translations: any = { 16 | en, 17 | it, 18 | }; 19 | 20 | export { it, en }; 21 | export default translations; 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/paid_support.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🎖 Paid support 3 | about: If you need paid support with hight priority donate correct tier on github.com/sponsors/ptkdev or patreon.com/join/ptkdev and send email to support@ptkdev.io 4 | --- 5 | 6 | ## PAID SUPPORT 7 | 8 | If you need paid support with hight priority donate correct tier on: 9 | 10 | - https://github.com/sponsors/ptkdev 11 | - https://www.patreon.com/join/ptkdev 12 | 13 | Please send me an email (support@ptkdev.io) before donation, i try provide correct price quotation for your bug or new feature. 14 | -------------------------------------------------------------------------------- /scripts/configs.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Check configs.js 3 | * ===================== 4 | * Check if configs/config.js exist, if don't exist rename .tpl 5 | * 6 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 7 | * 8 | * @license: MIT License 9 | * 10 | */ 11 | import * as fs from "fs"; 12 | import * as shell from "shelljs"; 13 | 14 | declare const __dirname: string; 15 | 16 | const path = `${__dirname}/../app/configs/config.js`; 17 | 18 | if (!fs.existsSync(path)) { 19 | shell.cp("-Rf", `${__dirname}/../app/configs/config.js.tpl`, path); 20 | } 21 | -------------------------------------------------------------------------------- /app/configs/config.js.tpl: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | server: { 3 | // http://localhost:[PORT] 4 | port: 5000, 5 | }, 6 | 7 | // Default language 8 | language: "en", 9 | 10 | // Debug 11 | debug: "disabled", 12 | 13 | // LOGS 14 | // See: https://github.com/ptkdev/ptkdev-logger 15 | logger: { 16 | path: { 17 | debug_log: "./logs/debug.log", 18 | error_log: "./logs/errors.log", 19 | }, 20 | language: "en", 21 | colors: true, 22 | debug: "enabled", 23 | info: "enabled", 24 | warning: "enabled", 25 | error: "enabled", 26 | sponsor: "enabled", 27 | write: false, 28 | type: "log", 29 | }, 30 | }; 31 | -------------------------------------------------------------------------------- /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "ptkdev-boilerplate/svelte-electron-boilerplate", 3 | "projectOwner": "ptkdev", 4 | "repoType": "github", 5 | "repoHost": "https://github.com", 6 | "files": [ 7 | "README.md" 8 | ], 9 | "imageSize": 100, 10 | "commit": true, 11 | "contributors": [ 12 | { 13 | "login": "ptkdev", 14 | "name": "Patryk Rzucidło", 15 | "avatar_url": "https://avatars1.githubusercontent.com/u/442844?v=4", 16 | "profile": "https://ptk.dev", 17 | "contributions": [ 18 | "code", 19 | "translation", 20 | "doc", 21 | "bug" 22 | ] 23 | } 24 | ], 25 | "contributorsPerLine": 6, 26 | "commitConvention": "none" 27 | } 28 | -------------------------------------------------------------------------------- /app/components/common/footer/footer.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 |
17 |

18 | {translate("footer_license")} MIT. 19 |

20 |
21 |
22 | 23 | 26 | -------------------------------------------------------------------------------- /scripts/debug.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Disable debug 3 | * ===================== 4 | * Check if configs/config.js has debug to off 5 | * 6 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 7 | * 8 | * @license: MIT License 9 | * 10 | */ 11 | import * as fs from "fs"; 12 | import * as shell from "shelljs"; 13 | import { argv } from "yargs"; 14 | 15 | declare const __dirname: string; 16 | 17 | const path = `${__dirname}/../app/configs/config.js`; 18 | 19 | if (fs.existsSync(path)) { 20 | if (argv.enable) { 21 | shell.sed("-i", 'debug: "disabled"', 'debug: "enabled"', path); 22 | } else { 23 | shell.sed("-i", 'debug: "enabled"', 'debug: "disabled"', path); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/components/common/darkmode/darkmode.svelte: -------------------------------------------------------------------------------- 1 | 20 | 21 |
22 | darkModeToggle()} {checked} /> 23 |
25 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | svelte-electron-boilerplate 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /setup.json: -------------------------------------------------------------------------------- 1 | { 2 | "package_name": "svelte-electron-boilerplate", 3 | "package_org": "@ptkdev", 4 | "display_name": "Svelte Electron Boilerplate", 5 | "description": "Create a desktop app with this user friendly Svelte boilerplate for electron", 6 | "author": "Patryk Rzucidło [@ptkdev] (https://ptk.dev)", 7 | "author_markdown": "[Patryk Rzucidło](https://ptk.dev) ([@PTKDev](https://twitter.com/ptkdev)) <[support@ptkdev.io](mailto:support@ptkdev.io)>", 8 | "author_url": "https://ptk.dev", 9 | "github_nickname": "ptkdev", 10 | "github_repository_url": "github.com/ptkdev-boilerplate", 11 | "github_full_repository_url": "github.com/ptkdev-boilerplate/svelte-electron-boilerplate", 12 | "email": "support@ptkdev.io" 13 | } 14 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 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 'support@ptkdev.io' 20 | - run: npm ci 21 | - run: npm run release 22 | -------------------------------------------------------------------------------- /electron/preload.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Preload 3 | * ===================== 4 | * 5 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 6 | * 7 | * @license: MIT License 8 | * 9 | */ 10 | 11 | // All of the Node.js APIs are available in the preload process. 12 | // It has the same sandbox as a Chrome extension. 13 | window.addEventListener("DOMContentLoaded", () => { 14 | const replaceText = (selector: string, text: string) => { 15 | const element = document.getElementById(selector); 16 | if (element) { 17 | element.innerText = text; 18 | } 19 | }; 20 | 21 | for (const type of ["chrome", "node", "electron"]) { 22 | replaceText(`${type}-version`, process.versions[type as keyof NodeJS.ProcessVersions]); 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /app/translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "contributions": { 3 | "language": "English", 4 | "license": "CC BY 4.0", 5 | "contributors": ["Patryk Rzucidło [@ptkdev] (https://ptk.dev)"] 6 | }, 7 | "app_name": "svelte-electron-boilerplate", 8 | "hello_world": "Hello World!", 9 | "error404_notfound": "Not Found!", 10 | "error404_message": "Oops, this route doesn't exist!", 11 | "offline_title": "Offline!", 12 | "offline_message": "You are offline!", 13 | "wildcard_title": "Wildcard!", 14 | "wildcard_message": "Anything in the URL after /wild/ is shown below as message. That's found in the params.wild prop.", 15 | "wildcard_current": "Your message is: {{param}}", 16 | "footer_license": "The source code is licensed" 17 | } 18 | -------------------------------------------------------------------------------- /scripts/changelog.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-var-requires */ 2 | /** 3 | * Reset CHANGELOG 4 | * ===================== 5 | * 6 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 7 | * 8 | * @license: MIT License 9 | * 10 | */ 11 | import * as fs from "fs"; 12 | 13 | declare const __dirname: string; 14 | 15 | const changelog = `# v1.0.0 (${new Date().toLocaleString("en-us", { month: "long", year: "numeric", day: "numeric" })}) 16 | 17 | - First release 18 | 19 | 20 | 21 | `; 22 | 23 | fs.unlinkSync(`${__dirname}/../CHANGELOG.md`); 24 | fs.writeFileSync(`${__dirname}/../CHANGELOG.md`, `${changelog}`, { encoding: "utf8" }); 25 | -------------------------------------------------------------------------------- /app/translations/it.json: -------------------------------------------------------------------------------- 1 | { 2 | "contributions": { 3 | "language": "Italian", 4 | "license": "CC BY 4.0", 5 | "contributors": ["Patryk Rzucidło [@ptkdev] (https://ptk.dev)"] 6 | }, 7 | "app_name": "svelte-electron-boilerplate", 8 | "hello_world": "Ciao Mondo!", 9 | "error404_notfound": "Non trovata!", 10 | "error404_message": "Oops, questo url non esiste!", 11 | "offline_title": "Offline!", 12 | "offline_message": "Sei offline!", 13 | "wildcard_title": "Carta jolly!", 14 | "wildcard_message": "Qualsiasi valore dopo /wild/ sarà mostrato come messaggio. È disponibile nella proprietà params.wild.", 15 | "wildcard_current": "Il messaggio è: {{param}}", 16 | "footer_license": "Il codice sorgente è sotto licenza" 17 | } 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 💫 Feature request 3 | about: Suggest an idea or new feature for this project (low priority) 4 | --- 5 | 6 | 7 | 8 | ### Feature description 9 | 10 | 11 | 12 | ### Feature motivation 13 | 14 | 15 | 16 | 24 | -------------------------------------------------------------------------------- /scripts/changelog_release.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Version 3 | * ===================== 4 | * Increment package.json version 5 | * 6 | * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) 7 | * 8 | * @license: MIT License 9 | * 10 | */ 11 | import * as fs from "fs"; 12 | import Logger from "@ptkdev/logger"; 13 | 14 | const logger = new Logger(); 15 | 16 | if (fs.existsSync("./CHANGELOG.md")) { 17 | fs.readFile("./CHANGELOG.md", "utf8", (error, data) => { 18 | if (error) { 19 | logger.error(JSON.stringify(error)); 20 | } 21 | 22 | const changelog = data.match(/\n([\s\S]*)-->\n/gm); 23 | changelog?.forEach((c) => { 24 | fs.writeFile("./CHANGELOG_RELEASE.txt", c, function writeJSON(error) { 25 | if (error) { 26 | logger.error(JSON.stringify(error)); 27 | } 28 | }); 29 | }); 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /app/pages/index/index.svelte: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | 23 | 29 | -------------------------------------------------------------------------------- /app/pages/404/404.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 |
19 |
20 |
21 |
22 |

{translate("error404_notfound")}

23 |
24 |
25 |
26 |
27 |

{translate("error404_message")}

28 |
29 |
30 | 31 |