npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

scorm-review

v1.3.0

Published

Convert SCORM zip packages into self-contained review HTML files

Readme

scorm-review

Inject the coreview annotation tool into any SCORM package — no server, no browser extension, no setup needed on the reviewer's end.


Table of Contents


What it does

scorm-review takes a SCORM package (zip file, unzipped folder, or a standalone HTML file) and injects the coreview annotation tool into it. The output is a new file your reviewers can open in any browser and leave comments directly on the slides — no install needed on their end.

Before:  my-course.zip           ← plain SCORM package
After:   my-course_review.zip    ← same package + annotation panel built in

Reviewers open index.html from the output zip and the annotation sidebar appears automatically.


How it works

  1. Opens the input (zip, folder, or HTML file)
  2. Finds the HTML entry point (index.html)
  3. Injects a <script> tag referencing coreview.js into that HTML file
  4. Adds coreview.js (the annotation tool) next to the entry HTML
  5. Saves the modified package as a new zip (or HTML file for single-file input)

The original file is never modified. A new _review file is always created.


Requirements

That's all. No other tools, no browser extensions, no server.

To check your Node.js version:

node --version
# Should print v18.x.x or higher

If you don't have Node.js, download the LTS version from nodejs.org.


Installation

Option A — Use with npx (no install)

Run it directly without installing anything:

npx scorm-review ./my-course.zip

npx is included with Node.js. On first run it fetches the package automatically.

Option B — Install globally

Install once, use from anywhere without the npx prefix:

npm install -g scorm-review

Then:

scorm-review ./my-course.zip

Usage

Convert a SCORM zip

npx scorm-review ./my-course.zip

Output in the same folder:

Input:  my-course.zip
Output: C:\path\to\my-course_review.zip

Processing SCORM zip... done.

✓ Created: my-course_review.zip (15.2 MB)

Convert a SCORM folder

If your SCORM package is already unzipped:

npx scorm-review ./my-course/

The tool walks the folder, finds index.html, injects the annotation tool, and packages everything back into a zip.

Convert a plain HTML file

For a standalone HTML file (not a SCORM package):

npx scorm-review ./page.html

Output: page_review.html — the script is embedded inline so no separate coreview.js file is needed.

Specify a custom output path

Use -o or --output to choose where the output file is saved:

npx scorm-review ./my-course.zip -o ./output/my-course_review.zip

The output directory is created automatically if it doesn't exist.

Show help

npx scorm-review --help

Output explained

| Input | Output file | Notes | |---|---|---| | my-course.zip | my-course_review.zip | New zip with coreview.js added and index.html injected | | my-course/ (folder) | my-course_review.zip | Folder re-zipped with coreview.js added and index.html injected | | page.html | page_review.html | Single file — script embedded inline |

The output is always saved next to the input file unless you specify -o.


What gets changed inside your package

Only two things change inside the output zip compared to the original:

  1. coreview.js is added — placed in the same folder as index.html
  2. One <script> tag is added to index.html — injected just before </body>
<!-- Added by scorm-review -->
<script
  src="./coreview.js"
  data-project="scorm-review"
  data-note="Please review all slides. Check layout, wording, and content."
  data-start-open="false">
</script>

Everything else — folder structure, file names, SCORM manifest, assets — is untouched.

If a coreview.js script tag already exists in the HTML, it is replaced rather than duplicated.


How to send to a reviewer

  1. Run scorm-review on your SCORM package
  2. Send the _review.zip to your reviewer (email, shared drive, etc.)
  3. Reviewer unzips it and opens index.html in any modern browser (Chrome, Edge, Firefox, Safari)
  4. The annotation panel appears automatically — they can leave comments on any slide
  5. They share their annotated session back to you (via the coreview export feature)

No installs, no accounts, no browser extensions required on the reviewer's side.


CLI reference

scorm-review <input> [options]

Arguments:
  <input>              Path to a .zip file, a folder, or a .html file

Options:
  -o, --output <path>  Custom output file path (default: <name>_review.zip next to input)
  -h, --help           Show help message

Supported input types:
  .zip                 SCORM package zip file
  folder/              Unzipped SCORM package directory
  .html / .htm         Plain HTML file

Exit codes:
  0    Success
  1    Error (path not found, unsupported file type, no HTML entry point found)

How it works internally

Entry point detection

The tool looks for the HTML entry point in this priority order:

  1. index.html at the root of the zip/folder
  2. Index.html at the root (case-insensitive fallback)
  3. <subfolder>/index.html — one level deep (common in SCORM packages where content is inside scorm_package/)
  4. Any .html file anywhere in the package

If no HTML file is found, the tool exits with an error.

Script injection

The <script> tag is injected just before </body>. If the HTML has no </body> tag, the script is appended to the end of the file.

Any existing coreview.js script tags are removed before injecting the new one — so re-running the tool on an already-injected package is safe and idempotent.

coreview.js bundling

coreview.js is baked into the CLI binary at build time using esbuild. This means:

  • The CLI is a single file with no runtime file dependencies
  • The same version of the annotation tool ships with every release
  • No network access is needed at runtime — everything is self-contained

Project structure

scorm-review-cli/
├── src/
│   ├── cli.ts               # Entry point — argument parsing, file I/O, orchestration
│   ├── bundler.ts           # Core logic — zip handling, HTML injection, folder packing
│   └── bundler-template.ts  # Template used during the build to embed coreview.js
├── dist/                    # Compiled output (generated by build)
│   └── cli.js               # Single-file compiled CLI (published to npm)
├── build.mjs                # esbuild build script — compiles + inlines coreview.js
├── tsconfig.json            # TypeScript configuration
└── package.json

Key files

src/cli.ts — Handles all CLI concerns: argument parsing, input validation, calling the right bundler function, and writing the output file. Contains no bundling logic itself.

src/bundler.ts — Contains three exported functions:

  • bundleScormZip(zipBuffer, coreviewScript) — processes a zip Buffer
  • bundleScormFolder(folderPath, coreviewScript) — processes a folder on disk
  • bundlePlainHtml(htmlBuffer, coreviewScript) — processes a standalone HTML file

build.mjs — esbuild script that reads coreview.js from disk, base64-encodes it (or inlines it as a string), and substitutes the __COREVIEW_SCRIPT__ constant at bundle time. The result is dist/cli.js, a single portable file with no external dependencies.


Building from source

# Install dev dependencies
npm install

# Build dist/cli.js
npm run build

The build script (build.mjs) uses esbuild to:

  1. Compile TypeScript to JavaScript
  2. Bundle all imports into a single file
  3. Inline coreview.js as a string constant at build time
  4. Output dist/cli.js with the Node.js shebang line

To test the built binary locally:

node dist/cli.js ./samplefolder/sample3.zip

Troubleshooting

npx: command not found

Node.js is not installed or not on your PATH. Download from nodejs.org and reinstall.


Error: Path not found: ...

The file or folder you specified doesn't exist at that path. Check for typos, or use the full absolute path:

npx scorm-review "C:\Users\yourname\Desktop\my-course.zip"

Error: No HTML entry point found

The zip doesn't contain an index.html. Possible causes:

  • You pointed at a zip that isn't a SCORM package
  • The SCORM package has a non-standard entry point (e.g. story.html instead of index.html)
  • The index.html is nested more than one level deep

Try unzipping manually and pointing the tool at the folder that contains index.html:

npx scorm-review ./unzipped-course/

Error: Unsupported file type ".pptx"

Only .zip, .html, .htm, and folders are accepted. Other file types are not supported.


Output zip is much larger than the original

This is expected when the original zip used maximum compression. The tool re-compresses with level 6 (balanced), which may produce a slightly larger file compared to an original that was compressed at level 9. The content is identical.


Running the tool again on a _review.zip adds a second injection

Re-running on an already-processed file is safe — the tool removes any existing coreview.js script tag before injecting a new one, so no duplication occurs.