dokio-create-template 1.0.0 → 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/EXAMPLES.md +609 -0
- package/INSTALLATION.md +516 -0
- package/QUICKSTART.md +218 -0
- package/SETUP.md +192 -0
- package/STRUCTURE.txt +0 -0
- package/package.json +4 -25
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.
|
|
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/yourusername/dokio-create-template.git"
|
|
29
|
-
},
|
|
30
|
-
"bugs": {
|
|
31
|
-
"url": "https://github.com/yourusername/dokio-create-template/issues"
|
|
32
|
-
},
|
|
33
|
-
"homepage": "https://github.com/yourusername/dokio-create-template#readme",
|
|
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
|
}
|