| 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-theme for the repair guide.
-
Identify the theme directory. It will be under themes/<name>/ or examples/<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/*.png at their native pixel dimensions
- Assembles
dist/<themeName>/ with config.json + all PNGs flat in the root
- Zips to
dist/<themeName>.zip
The <themeName> is read from the "themeName" field in config.json.
-
Verify output:
dist/<themeName>/ should contain config.json + all PNG files
dist/<themeName>.zip should 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>.zip directly 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, and viewBox.
- 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>/ and config.json is present.
- Wrong dimensions: Each PNG must match the dimension spec — run
npm run convert standalone and check the reported (WxH) for each file.