resuml 1.2.1

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/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2024, phoinixi <https://github.com/phoinixi>
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
+ PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # resuml
2
+
3
+ A CLI tool for generating JSON resumes from YAML with theme support. This tool helps you maintain your resume in YAML format and convert it to various formats including JSON and HTML with different themes.
4
+
5
+ ## Prerequisites
6
+
7
+ - Node.js >= 20.0.0
8
+ - npm >= 10.0.0
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm install -g resuml
14
+ ```
15
+
16
+ ## Quick Start
17
+
18
+ 1. Create a YAML file for your resume (e.g., `resume.yaml`)
19
+ 2. Validate your resume data:
20
+ ```bash
21
+ resuml validate --resume resume.yaml
22
+ ```
23
+ 3. Convert to JSON:
24
+ ```bash
25
+ resuml tojson --resume resume.yaml --output resume.json
26
+ ```
27
+ 4. Render with a theme:
28
+ ```bash
29
+ resuml render --resume resume.yaml --theme stackoverflow --output resume.html
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ ### Validate resume data
35
+
36
+ ```bash
37
+ resuml validate --resume resume.yaml
38
+ ```
39
+
40
+ ### Convert YAML to JSON
41
+
42
+ ```bash
43
+ resuml tojson --resume resume.yaml --output resume.json
44
+ ```
45
+
46
+ ### Render resume with theme
47
+
48
+ ```bash
49
+ resuml render --resume resume.yaml --theme stackoverflow --output resume.html
50
+ ```
51
+
52
+ ## Examples
53
+
54
+ For detailed examples and usage instructions, see the [examples/README.md](examples/README.md) file.
55
+
56
+ ## Commands
57
+
58
+ - `validate` - Validates resume data against the JSON Resume schema
59
+ - `tojson` - Converts YAML resume data to JSON format
60
+ - `render` - Renders the resume using a specified theme
61
+ - `dev` - Starts a development server with hot-reload
62
+
63
+ ## Options
64
+
65
+ - `--resume, -r` - Input YAML file(s) or directory
66
+ - `--output, -o` - Output file path
67
+ - `--theme, -t` - Theme to use for rendering
68
+ - `--port, -p` - Port for development server (default: 3000)
69
+ - `--debug` - Enable debug mode for detailed error messages
70
+
71
+ ## Example YAML Structure
72
+
73
+ ```yaml
74
+ basics:
75
+ name: John Doe
76
+ label: Software Engineer
77
+ email: john@example.com
78
+ summary: Experienced software engineer...
79
+ location:
80
+ city: San Francisco
81
+ countryCode: US
82
+ profiles:
83
+ - network: GitHub
84
+ url: https://github.com/johndoe
85
+
86
+ work:
87
+ - company: Tech Corp
88
+ position: Senior Engineer
89
+ startDate: 2020-01
90
+ endDate: Present
91
+ summary: Led development of...
92
+ ```
93
+
94
+ ## Available Themes
95
+
96
+ - `stackoverflow` - Clean and professional theme based on Stack Overflow's style
97
+ - `react` - Modern React-based theme with interactive features
98
+ - More themes coming soon...
99
+
100
+ ## Troubleshooting
101
+
102
+ ### Common Issues
103
+
104
+ 1. **Validation Errors**
105
+
106
+ - Ensure your YAML follows the JSON Resume schema
107
+ - Check for proper indentation in your YAML file
108
+ - Verify all required fields are present
109
+
110
+ 2. **Theme Rendering Issues**
111
+
112
+ - Make sure the theme is properly installed
113
+ - Check if all required theme dependencies are installed
114
+ - Try running with `--debug` flag for more information
115
+
116
+ 3. **Development Server Issues**
117
+ - Ensure the specified port is available
118
+ - Check if you have proper permissions to access the port
119
+ - Try a different port if the default is blocked
120
+
121
+ ## Contributing
122
+
123
+ Contributions are welcome! Please feel free to submit a Pull Request.
124
+
125
+ ## License
126
+
127
+ ISC
package/bin/resuml.cjs ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ /* eslint-env node */
3
+
4
+ const { existsSync } = require('fs');
5
+ const { join } = require('path');
6
+ const distPath = join(__dirname, '../dist/index.js');
7
+
8
+ function startCli() {
9
+ try {
10
+ if (existsSync(distPath)) {
11
+ require(distPath);
12
+ } else {
13
+ throw new Error('CLI not built. Please run "npm run build" first.');
14
+ }
15
+ } catch (err) {
16
+ console.error('Error starting resuml CLI:', err);
17
+ process.exit(1);
18
+ }
19
+ }
20
+
21
+ startCli();