laiso / site2pdf

Generate comprehensive PDFs of entire websites, ideal for RAG.
MIT License
176 stars 8 forks source link

refactoring: build and testing #14

Closed laiso closed 2 weeks ago

laiso commented 2 weeks ago

Changes

Details

  1. Removed bin/index.js and modified bin/site2pdf.js to call the main function directly.
  2. Updated the version in package.json from 0.1.0 to 0.1.1 and changed the bin entry from bin/index.js to bin/site2pdf.js.
  3. Made the following changes to index.ts:
    • Added showHelp function.
    • Added useBrowserContext function.
    • Modified generatePDF function to use the BrowserContext type.
    • Updated the main function to use useBrowserContext.
  4. Imported describe, it, and expect from @jest/globals in cli.test.ts.
  5. Updated index.test.ts to use the BrowserContext type.
  6. Changed the exclude entry in tsconfig.json from **/*.spec.ts to **/*.test.ts.