-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ddf91bf
Showing
26 changed files
with
10,245 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Main | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: Lint, test and build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Install and build (with cache) | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Test | ||
run: npm test -- --ci --coverage --maxWorkers=2 | ||
|
||
- name: Coverage | ||
uses: codecov/codecov-action@v1 | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Install and build (with cache) | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: Release | ||
uses: cycjimmy/semantic-release-action@v2 | ||
with: | ||
extra_plugins: | | ||
conventional-changelog-conventionalcommits | ||
if: github.ref == 'refs/heads/master' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.log | ||
.DS_Store | ||
node_modules | ||
coverage | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"*.{js,ts}": ["tsdx lint -- --fix", "jest --bail --findRelatedTests"], | ||
"*.{json,md,yml}": "prettier --write" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"preset": "conventionalcommits" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Rafael Bardini | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Resumed | ||
|
||
[![npm package version](https://img.shields.io/npm/v/resumed)](https://www.npmjs.com/package/resumed) | ||
[![Build status](https://img.shields.io/github/workflow/status/rbardini/resumed/Main)](https://github.com/rbardini/resumed/actions) | ||
[![Code coverage](https://img.shields.io/codecov/c/github/rbardini/resumed.svg)](https://codecov.io/gh/rbardini/resumed) | ||
[![Dependencies status](https://img.shields.io/david/rbardini/resumed)](https://david-dm.org/rbardini/resumed) | ||
[![devDependencies status](https://img.shields.io/david/dev/rbardini/resumed)](https://david-dm.org/rbardini/resumed?type=dev) | ||
|
||
👔 Lightweight [JSON Resume](https://jsonresume.org/) builder, no-frills alternative to resume-cli. | ||
|
||
- 🗜️ Small (~125 lines) | ||
- 🧩 CLI and Node.js API | ||
- 🤖 TypeScript typings | ||
- 🎨 Theme auto-load | ||
- ⏱️ Async render support | ||
- 🧪 100% code coverage | ||
|
||
## Main differences from resume-cli | ||
|
||
Resumed automatically loads and uses the first installed [JSON Resume 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). | ||
|
||
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. | ||
|
||
While both tools can be used from the command line, Resumed also provides a fully-tested, strongly-typed Node.js API to create, validate and render resumes programatically. | ||
|
||
To keep the implementation simple and dependencies to a minimum, Resumed makes some compromises in terms of features, such as no PDF export, local previews or YAML format support. If you miss any of these, you can combine Resumed with other tools, (e.g. [Puppeteer](https://pptr.dev/) for PDF generation) or use the [official CLI tool](https://github.com/jsonresume/resume-cli). | ||
|
||
## Installation | ||
|
||
```shell | ||
npm install -g resumed jsonresume-theme-even # or your theme of choice | ||
``` | ||
|
||
One-off invocation without local installation: | ||
|
||
```shell | ||
npx resumed -p jsonresume-theme-even # or your theme of choice | ||
``` | ||
|
||
## Usage | ||
|
||
```console | ||
$ resumed --help | ||
|
||
Usage | ||
$ resumed <command> [options] | ||
|
||
Available Commands | ||
render Render resume | ||
init Create sample resume | ||
validate Validate resume | ||
|
||
For more info, run any command with the `--help` flag | ||
$ resumed render --help | ||
$ resumed init --help | ||
|
||
Options | ||
-v, --version Displays current version | ||
-h, --help Displays this message | ||
``` | ||
|
||
## Commands | ||
|
||
### `render` (default) | ||
|
||
Render resume. | ||
|
||
**Usage:** `resumed render [filename] [options]` | ||
|
||
**Aliases:** `export` | ||
|
||
**Options:** | ||
|
||
- `-o`, `--output`: Output filename (default `resume.html`) | ||
- `-t`, `--theme`: Theme to use, if more than one is installed | ||
- `-h`, `--help`: Display help message | ||
|
||
### `init` | ||
|
||
Create sample resume. | ||
|
||
**Usage:** `resumed init [filename] [options]` | ||
|
||
**Aliases:** `create` | ||
|
||
**Options:** | ||
|
||
- `-h`, `--help`: Display help message | ||
|
||
### `validate` | ||
|
||
Validate resume. | ||
|
||
**Usage:** `resumed validate [filename] [options]` | ||
|
||
**Options:** | ||
|
||
- `-h`, `--help`: Display help message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env node | ||
require('../dist').cli.parse(process.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const { defaults } = require('jest-config') | ||
|
||
module.exports = { | ||
clearMocks: true, | ||
coverageReporters: [...defaults.coverageReporters, 'text-summary'], | ||
} |
Oops, something went wrong.