Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add watch and serve commands to the cli #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

whi-tw
Copy link

@whi-tw whi-tw commented Jun 30, 2023

Commands

watch

This watches for changes to the json file and rebuilds the resume to the specified output file.

serve

This serves the file to a local server, http://127.0.0.1:3000 by default.

The resume html is served at the root of the server and is generated from the json file at page-load time.

Using livereload, the json file is watched for changes. On change, the page is automatically refreshed in the browser.

Caveats

This is quite minimal - I'm not really sure how to test this, I just wanted these features for my own use, and thought they
could be useful in the upstream project.

There is also a lot of duplication - the logic for generation for both these commands is identical.

cli.ts: TS2307
index.ts: 4x TS2835
- `watch` will watch for changes to the json file and rebuild the resume
- `serve` will serve the resume on a local server and live-reload when
  changes are made to the json file
jest was removed in rbardini#5, but the config file was missed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant