Skip to content

Commit

Permalink
fix serving local themes
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasdavis committed Apr 3, 2024
1 parent 2c169c1 commit f942566
Show file tree
Hide file tree
Showing 5 changed files with 1,713 additions and 57 deletions.
3 changes: 2 additions & 1 deletion lib/builder.js
Expand Up @@ -41,7 +41,8 @@ module.exports = function resumeBuilder(theme, dir, resumeFilename, cb) {
console.log(
chalk.cyan('Using example resume.json from resume-schema instead...'),
);
resumeJson = require('resume-schema').resumeJson;

resumeJson = require('resume-schema/sample.resume.json');
} else {
try {
// todo: test resume schema
Expand Down
2 changes: 1 addition & 1 deletion lib/main.js
Expand Up @@ -38,7 +38,7 @@ const normalizeTheme = (value, defaultValue) => {
'-t, --theme <theme name>',
'Specify theme used by `export` and `serve` or specify a path starting with . (use . for current directory or ../some/other/dir)',
normalizeTheme,
'jsonresume-theme-even',
'jsonresume-theme-elegant',
)
.option('-f, --format <file type extension>', 'Used by `export`.')
.option(
Expand Down
1 change: 1 addition & 0 deletions lib/serve.js
Expand Up @@ -6,6 +6,7 @@ const bs = require('browser-sync').create();
const builder = require('./builder');

const reBuildResume = (theme, dir, resumeFilename, cb) => {
console.log({ theme, dir, resumeFilename, cb });
builder(theme, dir, resumeFilename, (err, html) => {
if (err) {
readline.cursorTo(process.stdout, 0);
Expand Down

0 comments on commit f942566

Please sign in to comment.