dokio-create-template 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -62,20 +62,17 @@ The tool generates the following files:
62
62
  ## Template Types
63
63
 
64
64
  ### General (Image)
65
-
66
65
  - Export formats: JPG, PNG
67
66
  - Dimensions: 400x400px (customizable)
68
67
  - Use case: Social media graphics, banners, thumbnails
69
68
 
70
69
  ### PDF
71
-
72
70
  - Export formats: Hi-res PDF, Low-res PDF, Print orders
73
71
  - Prince XML support (versions 11 or 15)
74
72
  - Built-in support for headers, footers, page numbers
75
73
  - Use case: Brochures, flyers, certificates, reports
76
74
 
77
75
  ### Email
78
-
79
76
  - Responsive design (desktop and mobile)
80
77
  - Outlook and Gmail compatible
81
78
  - Export formats: Standalone HTML, Hosted HTML, URL
@@ -83,7 +80,6 @@ The tool generates the following files:
83
80
  - Use case: Marketing emails, newsletters, transactional emails
84
81
 
85
82
  ### Video
86
-
87
83
  - Resolution: 1920x1080 (Full HD)
88
84
  - Default duration: 30 seconds
89
85
  - Export format: 1080p video
@@ -124,26 +120,22 @@ $ dokio-create-template
124
120
  After generating your template, you can customize:
125
121
 
126
122
  ### data.yaml
127
-
128
123
  - Add/modify fields
129
124
  - Configure export options
130
125
  - Set page dimensions
131
126
  - Define default values
132
127
 
133
128
  ### index.html
134
-
135
129
  - Add markup structure
136
130
  - Use Handlebars syntax for dynamic content
137
131
  - Reference field values with `{{{field-name}}}`
138
132
 
139
133
  ### style.scss.hbs
140
-
141
134
  - Write SCSS styles
142
135
  - Use Handlebars for dynamic styling
143
136
  - Configure responsive breakpoints (email templates)
144
137
 
145
138
  ### CHANGELOG.md
146
-
147
139
  - Document template changes
148
140
  - Track version history
149
141
 
@@ -163,8 +155,7 @@ MIT
163
155
 
164
156
  ## Author
165
157
 
166
- - [Jake Lourence Villar](https://github.com/jeikudev)
167
- - [Dokio](https://dokio.com)
158
+ Dokio - https://dokio.com
168
159
 
169
160
  ---
170
161
 
package/SETUP.md ADDED
@@ -0,0 +1,192 @@
1
+ # Setup Guide - dokio-create-template
2
+
3
+ This guide will walk you through setting up and publishing the `dokio-create-template` npm package.
4
+
5
+ ## Prerequisites
6
+
7
+ - Node.js 14.0.0 or higher
8
+ - npm account (for publishing)
9
+
10
+ ## Installation for Development
11
+
12
+ 1. **Clone or create the package directory:**
13
+ ```bash
14
+ cd dokio-create-template
15
+ ```
16
+
17
+ 2. **Install dependencies:**
18
+ ```bash
19
+ npm install
20
+ ```
21
+
22
+ 3. **Test the CLI locally:**
23
+ ```bash
24
+ node bin/cli.js
25
+ ```
26
+
27
+ Or link it globally to test:
28
+ ```bash
29
+ npm link
30
+ dokio-create-template
31
+ ```
32
+
33
+ ## Publishing to npm
34
+
35
+ ### First Time Setup
36
+
37
+ 1. **Login to npm:**
38
+ ```bash
39
+ npm login
40
+ ```
41
+
42
+ 2. **Verify your package name is available:**
43
+ ```bash
44
+ npm search dokio-create-template
45
+ ```
46
+
47
+ 3. **Update package.json with your details:**
48
+ - Change author name
49
+ - Add your repository URL
50
+ - Verify version number
51
+
52
+ 4. **Publish the package:**
53
+ ```bash
54
+ npm publish
55
+ ```
56
+
57
+ ### Updating the Package
58
+
59
+ 1. **Make your changes**
60
+
61
+ 2. **Update version number:**
62
+ ```bash
63
+ # For bug fixes
64
+ npm version patch
65
+
66
+ # For new features
67
+ npm version minor
68
+
69
+ # For breaking changes
70
+ npm version major
71
+ ```
72
+
73
+ 3. **Publish the update:**
74
+ ```bash
75
+ npm publish
76
+ ```
77
+
78
+ ## Testing
79
+
80
+ ### Test Template Generation
81
+
82
+ ```bash
83
+ # Test general template
84
+ dokio-create-template
85
+ # Select: General (Image)
86
+
87
+ # Test PDF template
88
+ dokio-create-template
89
+ # Select: PDF
90
+
91
+ # Test email template
92
+ dokio-create-template
93
+ # Select: Email
94
+
95
+ # Test video template
96
+ dokio-create-template
97
+ # Select: Video
98
+ ```
99
+
100
+ ### Verify Output
101
+
102
+ After generation, check that all files are created:
103
+ - `index.html`
104
+ - `style.scss.hbs`
105
+ - `data.yaml`
106
+ - `CHANGELOG.md`
107
+
108
+ ## Troubleshooting
109
+
110
+ ### "Command not found" error
111
+
112
+ If you get a "command not found" error after global installation:
113
+
114
+ 1. Check npm global bin path:
115
+ ```bash
116
+ npm config get prefix
117
+ ```
118
+
119
+ 2. Add to your PATH (add to ~/.bashrc or ~/.zshrc):
120
+ ```bash
121
+ export PATH="$PATH:$(npm config get prefix)/bin"
122
+ ```
123
+
124
+ 3. Reload your shell:
125
+ ```bash
126
+ source ~/.bashrc # or ~/.zshrc
127
+ ```
128
+
129
+ ### Module not found errors
130
+
131
+ Make sure dependencies are installed:
132
+ ```bash
133
+ npm install
134
+ ```
135
+
136
+ ### Permission errors on publish
137
+
138
+ Make sure you're logged in:
139
+ ```bash
140
+ npm whoami
141
+ npm login
142
+ ```
143
+
144
+ ## Directory Structure
145
+
146
+ ```
147
+ dokio-create-template/
148
+ ├── bin/
149
+ │ └── cli.js # CLI entry point
150
+ ├── lib/
151
+ │ └── creator.js # Main logic
152
+ ├── templates/
153
+ │ ├── general/
154
+ │ │ ├── index.html
155
+ │ │ ├── style.scss.hbs
156
+ │ │ ├── data.yaml
157
+ │ │ └── CHANGELOG.md
158
+ │ ├── pdf/
159
+ │ │ ├── index.html
160
+ │ │ ├── style.scss.hbs
161
+ │ │ ├── data.yaml
162
+ │ │ └── CHANGELOG.md
163
+ │ ├── email/
164
+ │ │ ├── index.html
165
+ │ │ ├── style.scss.hbs
166
+ │ │ ├── data.yaml
167
+ │ │ └── CHANGELOG.md
168
+ │ └── video/
169
+ │ ├── index.html
170
+ │ ├── style.scss.hbs
171
+ │ ├── data.yaml
172
+ │ └── CHANGELOG.md
173
+ ├── index.js
174
+ ├── package.json
175
+ ├── README.md
176
+ ├── LICENSE
177
+ └── .gitignore
178
+ ```
179
+
180
+ ## Next Steps
181
+
182
+ 1. Customize the templates in the `templates/` directory to match your organization's needs
183
+ 2. Add more template types if needed
184
+ 3. Enhance the CLI with additional options
185
+ 4. Add validation for template uploads
186
+ 5. Create tests
187
+
188
+ ## Support
189
+
190
+ For issues or questions:
191
+ - GitHub Issues: [your-repo-url]
192
+ - Dokio Support: https://support.dokio.com
package/STRUCTURE.txt ADDED
File without changes
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "dokio-create-template",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "CLI tool to scaffold Dokio templates (general, pdf, email, video)",
5
5
  "main": "index.js",
6
6
  "bin": {
7
- "dokio-create-template": "bin/cli.js"
7
+ "dokio-create-template": "./bin/cli.js"
8
8
  },
9
9
  "scripts": {
10
10
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -14,23 +14,10 @@
14
14
  "template",
15
15
  "cli",
16
16
  "scaffold",
17
- "generator",
18
- "pdf",
19
- "email",
20
- "video",
21
- "create-template",
22
- "boilerplate"
17
+ "generator"
23
18
  ],
24
19
  "author": "Dokio",
25
20
  "license": "MIT",
26
- "repository": {
27
- "type": "git",
28
- "url": "https://github.com/jeikudev/dokio-create-template"
29
- },
30
- "bugs": {
31
- "url": "https://github.com/jeikudev/dokio-create-template/issues"
32
- },
33
- "homepage": "https://dokio.com/",
34
21
  "dependencies": {
35
22
  "inquirer": "^8.2.5",
36
23
  "chalk": "^4.1.2",
@@ -38,13 +25,5 @@
38
25
  },
39
26
  "engines": {
40
27
  "node": ">=14.0.0"
41
- },
42
- "files": [
43
- "bin/",
44
- "lib/",
45
- "templates/",
46
- "index.js",
47
- "README.md",
48
- "LICENSE"
49
- ]
28
+ }
50
29
  }
@@ -1,8 +1,16 @@
1
-
2
- <div class="page" style="background-color: #{{background-color}};">
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>{{TEMPLATE_NAME}}</title>
7
+ </head>
8
+ <body>
9
+ <div class="container" style="background-color: #{{background-color}};">
3
10
  <div class="content">
4
11
  <h1 class="heading">{{{heading}}}</h1>
5
12
  <div class="body-text">{{{body-text}}}</div>
6
13
  </div>
7
14
  </div>
8
-
15
+ </body>
16
+ </html>
@@ -13,7 +13,7 @@ body {
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
- .page {
16
+ .container {
17
17
  width: 400px;
18
18
  height: 400px;
19
19
  display: flex;
@@ -1,7 +1,15 @@
1
-
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>{{TEMPLATE_NAME}}</title>
6
+ </head>
7
+ <body>
2
8
  <div class="page">
3
9
  <div class="content">
4
10
  <h1 class="heading" style="color: #{{primary-color}};">{{{heading}}}</h1>
5
11
  <div class="body-text">{{{body-text}}}</div>
6
12
  </div>
7
13
  </div>
14
+ </body>
15
+ </html>