Skip to content

Package as an installable scoped npm CLI: @devroy10/html-to-pdf #2

@devroy10

Description

@devroy10

Parent: #1

Goal
Package this repository as an installable npm CLI so users can install globally (or use npx) and convert HTML to PDF from the command line.

Acceptance criteria

  • package.json includes a bin entry exposing a CLI command (e.g. html-to-pdf).
  • The CLI accepts input (URL or local HTML file) and output path arguments.
  • Basic CLI help/usage printed with -h/--help.
  • Cross-platform executable (shebang + proper permissions) and tested locally.
  • README updated with install and usage examples (npm i -g and npx).
  • CI workflow added to build/test and publish to npm on release (optional: GitHub Actions).
  • Version bumped and package name chosen/published using a scoped name (@devroy10/html-to-pdf).
  • Unit/integration tests for CLI parsing and core behavior.

Tasks

  • Add bin entry in package.json.
  • Implement CLI entrypoint (parse args, call existing library functions).
  • Add usage/help text and exit codes.
  • Update README with install/usage.
  • Add simple tests for CLI.
  • Add GitHub Actions workflow to test and optionally publish on tag.
  • Publish initial version with package name @devroy10/html-to-pdf.

Notes

  • Use scoped npm package name: @devroy10/html-to-pdf.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions