From 8bde783d5b6f4621a0efc092e6c7e32d2882ed57 Mon Sep 17 00:00:00 2001 From: DanBurkhardt Date: Sun, 25 Sep 2022 15:03:27 -0400 Subject: [PATCH] udpated logfile output name to match the actual project, updated readme with better VSCode task instructions --- README.md | 40 +++++++++++++++++++++++++++++++++++++--- main.py | 2 +- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9453eda..763f2df 100644 --- a/README.md +++ b/README.md @@ -31,16 +31,50 @@ sudo npm i -g pnpm - While decky-loader primarily targets Steam Deck hardware so keep this in mind when developing your plugin. 4. If you want an all encompassing demonstration of decky-frontend-lib's capabilites check out [decky-playground](https://github.com/SteamDeckHomebrew/decky-playground). It shows off almost all of decky-frontend-lib's features. -#### Other important information +#### Development and testing -Everytime you change the frontend code (`index.tsx` etc) you will need to rebuild using the commands from step 2 above or the build task if you're using vscode or a derivative. +### Re-building -Note: If you are receiving build errors due to an out of date library, you should run this command inside of your repository: +Every time you change the frontend code (`index.tsx` etc) you will need to rebuild using the commands from step 2 above. + +### Automation with VS Code + +If you're using vscode or a derivative you can use the tasks included in the `.vscode` template project to automate many parts of the process of building and deploying your plugin changes. + +In order to run these pre-made tasks: + +- open VSCode +- [install the "Task Runner" extension](https://marketplace.visualstudio.com/items?itemName=forbeslindesay.forbeslindesay-taskrunner) from the VS Code extension panel +- Navigate back to your project files panel and click "Task Runner" +- You will now see the tasks in the extension +- Click a task to run it + +Notes about tasks: + +- View / modify tasks and task confguration in `PROJECT_ROOT/.vscode` +- Update the vales in `settings.json` to your device's IP address and your deck user login password to enable the `deploy` task + +### Troubleshooting + +Out of date library errors: + +If you are receiving build errors due to an out of date library, you should run this command inside of your repository: ```bash pnpm update decky-frontend-lib --latest ``` +Build errors: + +When running `pnpm build` or the `build` VSCode task, you may see an error that says: + +``` +(!) If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle. +``` + +You may **ignore** this warning. Adding configs for `output.name` will actually prevent your plugin from loading properly + + ### Backend support If you are developing with a backend for a plugin and would like to submit it to the [decky-plugin-database](https://github.com/SteamDeckHomebrew/decky-plugin-database) you will need to have all backend code located in ``backend/src``, with backend being located in the root of your git repository. diff --git a/main.py b/main.py index 60ac607..aad94eb 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,6 @@ import logging -logging.basicConfig(filename="/tmp/template.log", +logging.basicConfig(filename="/tmp/decky-plugin-template.log", format='[Template] %(asctime)s %(levelname)s %(message)s', filemode='w+', force=True)