Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build/test instructions? #105

Open
mdeguzis opened this issue Oct 10, 2024 · 4 comments
Open

Build/test instructions? #105

mdeguzis opened this issue Oct 10, 2024 · 4 comments

Comments

@mdeguzis
Copy link
Contributor

mdeguzis commented Oct 10, 2024

The basic commands (pnpm run build) do not work out of the box. I am new to building this? Can you update the README with instructions? I'd like to take a crack an improving the log file viewer.

$ npm run build

> [email protected] build
> shx rm -rf dist && rollup -c

[!] SyntaxError: Unexpected identifier 'assert'
SyntaxError: Unexpected identifier 'assert'
    at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:166:18)
    at callTranslator (node:internal/modules/esm/loader:437:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:443:30)
    at ModuleJob._link (node:internal/modules/esm/module_job:106:19)

$ pnpm i
$ pnpm run build

<same output>
  • Update 1: Seems you have to use Node 18, Node 22 was too new. Still would like confirmation of steps. I know I can load (hopefully) the ZIP via the developer area of Decky Loaoder.
@mdeguzis
Copy link
Contributor Author

mdeguzis commented Oct 10, 2024

This is what I have so far..

#!/usr/bin/env bash
# See: https://github.com/SteamDeckHomebrew/decky-plugin-template
# Requires: npm i -g pnpm@9

SCRIPTDIR=$PWD

pnpm i
pnpm run build

cd ..
rm -fv decky-cloud-save.zip
zip -r decky-cloud-save.zip \
	$(basename ${SCRIPTDIR})/bin \
	$(basename ${SCRIPTDIR})/dist \
	$(basename ${SCRIPTDIR})/LICENSE \
	$(basename ${SCRIPTDIR})/main.py  \
	$(basename ${SCRIPTDIR})/package.json  \
	$(basename ${SCRIPTDIR})/plugin.json  \
	$(basename ${SCRIPTDIR})/py_modules  \
	$(basename ${SCRIPTDIR})/quickstart  \
	$(basename ${SCRIPTDIR})/README.md

scp decky-cloud-save.zip deck@steamdeck:/home/deck/decky-dev/

rm -f decky-cloud-save.zip

Hangs on install though via ZIP

@mdeguzis mdeguzis changed the title Build instructions? Build/test instructions? Oct 10, 2024
@mdeguzis
Copy link
Contributor Author

mdeguzis commented Oct 10, 2024

Doh... I see the vscode tasks

I found that vscode tasks can't really see the env well for node installed via tools like "mise" or "nvm", this worked around that:

sudo ln -s /home/mikeyd/.local/share/mise/installs/node/18/bin/node /usr/local/bin/node

@GedasFX
Copy link
Owner

GedasFX commented Oct 10, 2024

Yeah I was just using the default plugin configuration in the template. Those can for sure be improved 😅. If you wanna change those, you should consider contributing to the template, would be much bigger impact!

@mdeguzis
Copy link
Contributor Author

mdeguzis commented Oct 10, 2024

To be honest, the vscode tasks are kinda annoying and limited. It seems much easier to just update package.json with scripts. Make it universal vs relying on vscode. I'll probably do that later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants