dokio-create-template
v1.1.6
Published
CLI tool to scaffold Dokio templates (general, pdf, email, video)
Maintainers
Readme
dokio-create-template (TypeScript)
🚀 CLI tool to quickly scaffold Dokio templates
Generate starter templates for Dokio in seconds with all the necessary files and configurations.
Features
✨ 4 Template Types - General (Image), PDF, Email, Video
🎨 Interactive CLI - Beautiful prompts guide you through setup
📝 Complete Files - HTML, SCSS, YAML, CHANGELOG generated automatically
⚡ TypeScript Support - Full type safety and IDE autocomplete
🔧 Ready to Use - Upload generated files directly to Dokio
Installation
npm install -g dokio-create-templateOr use without installing:
npx dokio-create-templateUsage
Simply run the command and follow the prompts:
dokio-create-templateThe CLI will ask you:
- What type of template (General, PDF, Email, Video)
- Template name
- Template ID (auto-generated from name)
- Subdomain
- Output directory
For PDF templates, you'll also choose:
- Prince version (11 or 15)
- Whether it's resizable
- Whether it has dynamic page count
Example
$ dokio-create-template
🚀 Dokio Template Generator
? What type of template do you want to create? PDF
? Template name: Marketing Brochure
? Template ID (slug): marketing-brochure
? Subdomain: production
? Output directory: ./marketing-brochure
? Prince version: 15
? Is this a resizable template? No
? Will this template have dynamic page count? Yes
✔ Template created successfully!
📁 Files created:
./marketing-brochure/index.html
./marketing-brochure/style.scss.hbs
./marketing-brochure/data.yaml
./marketing-brochure/CHANGELOG.md
✨ Next steps:
cd marketing-brochure
Start customizing your template files
Upload to Dokio when readyTemplate Types
General (Image)
Perfect for social media graphics, banners, and thumbnails.
- Export formats: JPG, PNG
- Default size: 400x400px (customizable)
Ideal for brochures, flyers, certificates, and reports.
- Export formats: Hi-res PDF, Low-res PDF, Print-ready with crop marks
- Prince XML: Versions 11 or 15 support
- Features: Headers, footers, page numbers
Great for newsletters, marketing emails, and transactional emails.
- Responsive: Works on desktop and mobile
- Compatible: Outlook and Gmail tested
- Export formats: Standalone HTML, Hosted HTML, URL
- Accessible: Built-in accessibility features
Video
Best for social media videos, ads, and animations.
- Resolution: 1920x1080 (Full HD)
- Duration: 30 seconds (default)
- Export format: 1080p video
What Gets Generated
Each template includes 4 files:
- index.html - Template markup with Handlebars syntax
- style.scss.hbs - SCSS styles with Handlebars support
- data.yaml - Field definitions and template configuration
- CHANGELOG.md - Version history
Customizing Your Template
After generation:
- Navigate to your template directory
- Edit the files to match your needs
- Upload to Dokio Hub
- Test in Dokio Studio
For detailed customization help, see the Dokio Developer Reference.
TypeScript Support
If you're using TypeScript in your own projects, this package exports helpful types:
import type { TemplateType, TemplateConfig } from "dokio-create-template";
// TemplateType = 'general' | 'pdf' | 'email' | 'video'Getting Help
- Documentation: docs.dokio.com
- Support: support.dokio.com
- Issues: Report bugs on GitHub
License
MIT
Credits
Created by Jake Lourence Villar for Dokio
