GedasFX / decky-cloud-save

Other
92 stars 12 forks source link

Build/test instructions? #105

Open mdeguzis opened 1 week ago

mdeguzis commented 1 week ago

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

> decky-cloud-save@1.4.2 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>
mdeguzis commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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.