name: deploy-y1-theme description: Converts SVG assets to PNG, bundles the theme, and creates a zip ready to copy to the Y1 device. Use this when asked to deploy, bundle, package, or install a Y1 theme.
Y1 Theme Deployment
Bundle the theme for installation on the Y1 music player.
Steps
Validate first (if not already done):
node validate.js --theme=themes/<name>Fix any errors before proceeding. See
/validate-y1-themefor the repair guide.Identify the theme directory. It will be under
themes/<name>/orexamples/<name>/. If not specified, ask.Run the deploy pipeline:
node deploy.js --theme=themes/<name>This does three things automatically:
- Converts all
<theme-dir>/svg/*.svg→<theme-dir>/png/*.pngat their native pixel dimensions - Assembles
dist/<themeName>/withconfig.json+ all PNGs flat in the root - Zips to
dist/<themeName>.zip
The
<themeName>is read from the"themeName"field inconfig.json.- Converts all
Verify output:
dist/<themeName>/should containconfig.json+ all PNG filesdist/<themeName>.zipshould be present- The script reports count of converted files and zip size — confirm 0 failures
Install on device: Copy
dist/<themeName>/to your Y1's SD card at:/storage/sdcard0/Themes/<themeName>/Or unzip
dist/<themeName>.zipdirectly onto the SD card root — it extracts to the correct folder name automatically.On the device:
- Go to Settings → Theme
- Select your theme from the list
- Restart if prompted
Troubleshooting
- SVG conversion fails: Check the failing SVG for malformed XML. All SVGs must have a valid
width,height, andviewBox. - Icons show as blank on device: Confirm PNGs are flat in the theme root (not in a subdirectory).
- Theme not listed on device: Verify the folder is at exactly
/storage/sdcard0/Themes/<themeName>/andconfig.jsonis present. - Wrong dimensions: Each PNG must match the dimension spec — run
npm run convertstandalone and check the reported(WxH)for each file.