NPM Package: static-build-cache CLI and Module

  • report
    Click for Disclaimer
    This Project is over a year old (first published about 3 years ago). As such, please keep in mind that some of the information may no longer be accurate, best practice, or a reflection of how I would approach the same thing today.
  • infoFull Project Details
    info_outlineClick for Full Project Details
    Date Posted:
    Aug. 27, 2020
    Last Updated:
    Aug. 27, 2020
  • classTags
    classClick for Tags

How to Get It!

📦 NPM Package: static-build-cache

💾 Source Code: GitHub

What Is It?

A tool for projects that have a build step that produces static website content; it uses Git to check for committed changes and avoids redundant rebuilds if nothing has actually changed. Speeds up build & serve type deployments.

For more details, make sure to checkout the repository and README.

How Does It Work?

The easiest way to use it is to add it as a dependency and then call it from the command line, or package.scripts, with the exposed command: static-build-cache. You can also import it and use it as a JS module.

It is designed to be able to run with a zero-config input, but has a bunch of optional parameters (such as the serve command to execute) which can be specified.

Tools Used

  • TypeScript
  • Commander (CLI parsing)
  • Git
  • Bash / Cmd scripting
  • Ava (tests)
  • NYC (coverage)
  • Github Actions (automated test runs)

Leave a Reply

Your email address will not be published.