Packaging Your Template
Once your template passes validation, package it into a zip file for upload to the Gymlium developer portal.
Creating the zip file
Navigate to your template directory
cd sfy-pt-templates/templates/your-template-nameVerify validation passes
npm run validate -- --template your-template-nameCreate the zip file
From the template root, zip the entire directory:
cd ..
zip -r your-template-name.zip your-template-name/ \
-x "your-template-name/node_modules/*" \
-x "your-template-name/.DS_Store" \
-x "your-template-name/**/.DS_Store"Or use the SDK’s built-in packaging command:
npm run package -- --template your-template-nameThis creates dist/your-template-name.zip with all unnecessary files excluded.
What to include
Your zip file should contain your complete template directory:
your-template-name/
├── template.manifest.json
├── template.css
├── index.ts
├── Header/
│ ├── Header.tsx
│ └── Header.module.css
├── Footer/
│ ├── Footer.tsx
│ └── Footer.module.css
├── Loading/
│ ├── Loading.tsx
│ └── Loading.module.css
├── pages/
│ ├── home/
│ ├── about/
│ ├── login/
│ └── ... (optional pages)
├── preview/
│ ├── thumbnail.png
│ └── ... (screenshots)
└── README.md (optional)What to exclude
Do not include these in your zip file:
| Exclude | Reason |
|---|---|
node_modules/ | Dependencies are resolved by the platform |
.git/ | Version control metadata is not needed |
.DS_Store | macOS system files |
Thumbs.db | Windows system files |
*.log | Log files from development |
.env | Environment variables |
dist/ | Build output from other tools |
| Test files | *.test.tsx, *.spec.tsx |
The SDK’s npm run package command automatically excludes these files. If you’re creating the zip manually, double-check that none of these are included.
File size limits
| Limit | Value |
|---|---|
| Maximum zip size | 10 MB |
| Maximum uncompressed size | 20 MB |
| Maximum number of files | 200 |
If your template exceeds these limits, review your assets:
- Optimise images (compress PNGs, use JPEG for photos)
- Remove unused screenshots or assets
- Check for accidentally included files
Naming conventions
- Zip filename:
your-template-name.zip— must match theidin your manifest - Directory name:
your-template-name/— must match theidin your manifest - Use lowercase with hyphens:
elegant-fitness, notElegantFitnessorelegant_fitness
// template.manifest.json
{
"id": "elegant-fitness"
}// Directory and zip
elegant-fitness/
elegant-fitness.zipIf the zip filename, directory name, and manifest id don’t all match, the upload will be rejected.
Verifying your package
Before uploading, verify the zip contents:
unzip -l your-template-name.zipConfirm:
- The top-level directory matches your template ID
- No
node_modulesor system files are included - All required files are present
- Total size is within limits
Last updated on