Skip to content

Commit

Permalink
feat(theme)!: remove theme auto-load (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbardini committed Jan 9, 2023
1 parent ec96392 commit 5c33c67
Show file tree
Hide file tree
Showing 12 changed files with 149 additions and 258 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@

👔 Lightweight [JSON Resume](https://jsonresume.org/) builder, no-frills [alternative to resume-cli](#motivation).

- 🗜️ Small (~125 lines)
- 🗜️ Small (~120 LOC)
- 🧩 CLI and Node.js API
- 🤖 TypeScript typings
- 🎨 Theme auto-load
- ⏱️ Async render support
- 🧪 100% code coverage

Expand All @@ -20,8 +19,6 @@
npm install resumed jsonresume-theme-even # or your theme of choice
```

ℹ️ Global installation is not supported, as it breaks theme discovery.

## Usage

```console
Expand Down Expand Up @@ -59,7 +56,7 @@ Render resume.
**Options:**

- `-o`, `--output`: Output filename (default `resume.html`)
- `-t`, `--theme`: Theme to use, if more than one is installed
- `-t`, `--theme`: Theme to use
- `-h`, `--help`: Display help message

### `init`
Expand Down Expand Up @@ -92,9 +89,9 @@ Resumed is a _complete reimplementation_ of resume-cli, using more modern techno

### Theme resolution

Resumed automatically loads and uses the first installed [theme](https://www.npmjs.com/search?q=jsonresume-theme) found when rendering (exporting) a resume, similar to how [Prettier plugins](https://prettier.io/docs/en/plugins.html#using-plugins) work. If no theme is installed, Resumed will guide you on how to proceed. It will also let you know if _multiple_ themes are found, which one it picked, and how to [use another one](#render-default).
Resumed does not install any themes. You must [pick and install one](https://www.npmjs.com/search?q=jsonresume-theme) yourself, and specify your choice via the `--theme` option or the `.meta.theme` field of your resume.

In contrast, resume-cli comes with a theme, and requires specifying what theme to use if the default does not suit you. This is fine for most users, but it ties the default theme package release cycle to that of the CLI, and is a little more verbose.
In contrast, resume-cli comes with a default theme, and only supports the `--theme` option. This is fine for most users, but it ties the default theme package release cycle to that of the CLI, and may be a little more verbose.

### Interface

Expand Down
4 changes: 2 additions & 2 deletions examples/with-jsonresume-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"type": "module",
"scripts": {
"init": "resumed init",
"start": "resumed"
"start": "resumed --theme jsonresume-theme-even"
},
"dependencies": {
"jsonresume-theme-even": "^0.17.0",
"resumed": "^1.0.0"
"resumed": "^2.0.0"
}
}
4 changes: 2 additions & 2 deletions examples/with-local-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"type": "module",
"scripts": {
"init": "resumed init",
"start": "resumed"
"start": "resumed --theme jsonresume-theme-local"
},
"dependencies": {
"jsonresume-theme-local": "file:./theme",
"resumed": "^1.0.0"
"resumed": "^2.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/with-node-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"dependencies": {
"jsonresume-theme-even": "^0.17.0",
"puppeteer": "^13.0.0",
"resumed": "^1.0.0"
"resumed": "^2.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/with-pdf-export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"dependencies": {
"jsonresume-theme-even": "^0.17.0",
"puppeteer": "^13.0.0",
"resumed": "^1.0.0"
"resumed": "^2.0.0"
}
}
Loading

0 comments on commit 5c33c67

Please sign in to comment.