-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add * Hmm * Add * Add * Update pyproject.toml * Add * add * add * add * Add * Add * Add * Add * Add * Add * Add * Add * ha * Add * Update server.py * Update server.py * Add * Add * add * Add
- Loading branch information
1 parent
fde4ee0
commit 6d7bb82
Showing
115 changed files
with
6,971 additions
and
13,056 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' | ||
|
||
- package-ecosystem: 'pip' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,54 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
# node | ||
node_modules | ||
dist-ssr | ||
build | ||
*.local | ||
|
||
# sveltekit | ||
dist-front | ||
.svelte-kit | ||
|
||
# poetry | ||
.venv | ||
|
||
# pyloid | ||
venv-pyloid | ||
__pycache__ | ||
|
||
# pyinstaller | ||
dist | ||
out | ||
.DS_Store | ||
*.log* | ||
http_cache.sqlite | ||
seeder.db | ||
*.db-shm | ||
*.db-wal | ||
|
||
# npm | ||
package-lock.json | ||
|
||
# yarn | ||
yarn.lock | ||
|
||
# pnpm | ||
pnpm-lock.yaml | ||
|
||
# bun | ||
bun-lock.yaml | ||
|
||
# build.py handles that | ||
*.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
electron_mirror=https://npmmirror.com/mirrors/electron/ | ||
electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/ | ||
engine-strict=true | ||
legacy-peer-deps=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
|
||
dist | ||
# Package Managers | ||
package-lock.json | ||
pnpm-lock.yaml | ||
LICENSE.md | ||
tsconfig.json | ||
tsconfig.*.json | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"printWidth": 92, | ||
"tabWidth": 4, | ||
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], | ||
"overrides": [ | ||
{ | ||
"files": "*.svelte", | ||
"options": { | ||
"parser": "svelte" | ||
} | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,65 @@ | ||
# core-seeder-on-solid | ||
# Pyloid-SvelteKit | ||
|
||
An Electron application with Solid and TypeScript | ||
Pyloid-SvelteKit-boilerplate is a template for projects combining a SvelteKit frontend with a Python backend. Here, we'll explain in detail the project setup, development, and build process. | ||
|
||
## Recommended IDE Setup | ||
### Prerequisites | ||
|
||
- [VSCode](https://code.visualstudio.com/) + [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) | ||
- [Prerequisites](https://docs.pyloid.com/getting-started/prerequisites) | ||
|
||
## Project Setup | ||
## 1. Project Initialization | ||
|
||
### Install | ||
Before starting the project, you need to install all necessary dependencies. | ||
|
||
```bash | ||
$ npm install | ||
npm install # node | ||
poetry install # python | ||
``` | ||
|
||
### Development | ||
These commands performs the following tasks: | ||
|
||
1. Install npm packages | ||
2. Create a Python virtual environment using poetry (.venv) | ||
3. Install Python dependencies (based on pyproject.toml) | ||
|
||
## 2. Running the Development Server | ||
|
||
During development, you can run both frontend and backend servers simultaneously with the following command: | ||
|
||
```bash | ||
$ npm run dev | ||
npm run dev # sveltekit | ||
poetry run poe dev # pyloid | ||
``` | ||
|
||
### Build | ||
These commands performs the following tasks: | ||
|
||
```bash | ||
# For windows | ||
$ npm run build:win | ||
1. Run the SvelteKit frontend development server using Vite | ||
2. Run the Python backend server (run.py) | ||
|
||
# For macOS | ||
$ npm run build:mac | ||
The concurrently package is used to run both processes in parallel. | ||
|
||
# For Linux | ||
$ npm run build:linux | ||
## 3. Building the Project | ||
|
||
To build the project for production deployment, use the following command: | ||
|
||
```bash | ||
npm run build # sveltekit | ||
poetry run poe build # pyloid | ||
``` | ||
|
||
These commands performs the following tasks: | ||
|
||
1. Frontend build using Vite | ||
2. Package the Python backend into an executable using PyInstaller | ||
|
||
### How PyInstaller Works | ||
|
||
1. Dependency Analysis: PyInstaller analyzes the Python script and its dependencies. | ||
2. File Collection: It collects all necessary Python modules, libraries, and data files. | ||
3. Binary Generation: It packages the collected files into a single directory or a single executable file. | ||
|
||
### Important Notes | ||
|
||
- Cross-platform Builds: You need to perform the build for each platform on the respective operating system. | ||
- Environment Variables: You may need to set environment variables appropriately depending on the production environment. | ||
|
||
This guide should help you understand the process of initializing, developing, and building a project using the Pylon Boilerplate. Backend packaging with PyInstaller simplifies deployment and facilitates dependency management. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from pyloid.builder import create_spec_from_json, build_from_spec, cleanup_before_build | ||
|
||
|
||
def main(): | ||
spec_path = create_spec_from_json("build_config.json") | ||
cleanup_before_build("build_config.json") | ||
build_from_spec(spec_path) | ||
|
||
if __name__ == "__main__": | ||
main() |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/pyloid/pyloid/refs/heads/main/src/pyloid/builder/build_config.schema.json", | ||
"before_build": { | ||
"cleanup_patterns": [ | ||
"PySide6/opengl32sw.dll", | ||
"PySide6/translations/*.qm", | ||
"PySide6/translations/qtwebengine_locales/*.pak", | ||
"!PySide6/translations/qtwebengine_locales/en-US.pak" | ||
] | ||
}, | ||
"name": "pyloid-app", | ||
"main_script": "run.py", | ||
"datas": [ | ||
["src_pyloid/icons/", "src_pyloid/icons/"], | ||
["dist-front/", "dist-front/"] | ||
], | ||
"excludes": [ | ||
"PySide6.QtQml", | ||
"PySide6.QtTest", | ||
"PySide6.Qt3D", | ||
"PySide6.QtSensors", | ||
"PySide6.QtCharts", | ||
"PySide6.QtGraphs", | ||
"PySide6.QtDataVisualization", | ||
"PySide6.QtQuick", | ||
"PySide6.QtDesigner", | ||
"PySide6.QtUiTools", | ||
"PySide6.QtHelp" | ||
], | ||
"icon": "src_pyloid/icons/icon.ico", | ||
"bundle": { | ||
"windows": "onefile", | ||
"macos": "app", | ||
"linux": "directory" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "https://next.shadcn-svelte.com/schema.json", | ||
"style": "default", | ||
"tailwind": { | ||
"config": "tailwind.config.ts", | ||
"css": "src\\app.css", | ||
"baseColor": "slate" | ||
}, | ||
"aliases": { | ||
"components": "$lib/components", | ||
"utils": "$lib/utils", | ||
"ui": "$lib/components/ui", | ||
"hooks": "$lib/hooks" | ||
}, | ||
"typescript": true, | ||
"registry": "https://next.shadcn-svelte.com/registry" | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.