love-ecommerce-template 1.0.0 · SDK 1.2.0

Packaging & installing

Package

node sdk package [dir] [--no-build] [--skip-tests] [--out file.zip]
node bin/template-sdk verify dist/<name>-<version>.zip

Produces dist/<name>-<version>.zip containing one folder <name>/ with the built files, plus a .sha256 file. Verification extracts it to a temporary folder and checks: a single top-level folder with an allowed name (^[a-zA-Z0-9_-]{1,64}$), template.json present and valid, only files the application serves, and that the application's TemplateEngine loads it.

Install (store owner)

Template developers send the package zip to the store owner. What installing means for the application:

  1. Copy the template folder to <app>/templates/<name>/ (name: letters, digits, "-" and "_").
  2. Load it: restart the application, or (signed in as admin) POST /api/templates/reload {"templateName":"<name>"}.
  3. Activate it: set pos_setting.theme.activeThemeId to the folder name / theme.json slug / theme.json id, or (admin) POST /api/templates/switch {"theme":"<name>"}.
node bin/template-sdk install my-template-1.0.0.zip --app /path/to/frontend           # copy into <app>/templates/my-template
node bin/template-sdk install my-template-1.0.0.zip --app /path/to/frontend --force   # replace (the old folder is backed up to <app>/.template-backups)
node bin/template-sdk install my-template-1.0.0.zip --app /path/to/frontend --url https://shop.example --cookie "love.sid=…" --activate
                                                               # also reload and switch it on a running store (admin session)

The owner can check a package first with node bin/template-sdk verify my-template-1.0.0.zip --app /path/to/frontend (it is loaded with the application's own template engine) and run node sdk test on it against the live application version. Without --url, restart the application (or call the reload endpoint) and activate the template in the admin.

Export and import

node sdk export [dir] --format zip|folder   # the project source (with tests and sample data)
node bin/template-sdk import <folder|package.zip|installed-name> [dest]   # files are copied unchanged; IMPORT-REPORT.md describes them
Generated 2026-10-01 11:59 UTC from the application source (contract 7075c14c24bbaf06).