resuml 1.2.2 → 1.2.3
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 +24 -0
- package/dist/api.js +6829 -0
- package/dist/api.js.map +1 -0
- package/dist/index.js +119 -103
- package/dist/index.js.map +1 -1
- package/package.json +9 -2
- package/src/types/theme.d.ts +0 -15
package/README.md
CHANGED
|
@@ -125,3 +125,27 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
125
125
|
## License
|
|
126
126
|
|
|
127
127
|
ISC
|
|
128
|
+
|
|
129
|
+
## Node.js API Usage
|
|
130
|
+
|
|
131
|
+
You can use resuml programmatically from Node.js:
|
|
132
|
+
|
|
133
|
+
```js
|
|
134
|
+
import {
|
|
135
|
+
processResumeData,
|
|
136
|
+
loadResumeFiles,
|
|
137
|
+
loadTheme,
|
|
138
|
+
themeRender
|
|
139
|
+
} from 'resuml';
|
|
140
|
+
|
|
141
|
+
// Load YAML files
|
|
142
|
+
const { yamlContents } = await loadResumeFiles('resume.yaml');
|
|
143
|
+
// Validate and merge
|
|
144
|
+
const resume = await processResumeData(yamlContents);
|
|
145
|
+
// Load a theme
|
|
146
|
+
const theme = await loadTheme('stackoverflow');
|
|
147
|
+
// Render HTML
|
|
148
|
+
const html = await theme.render(resume, { locale: 'en' });
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
See the CLI and API for more details.
|