Skip to content

tj's staticgen, conveniently packaged for NodeJS projects

License

Notifications You must be signed in to change notification settings

explodingcamera/staticgen-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StaticGen-Node

StaticGen-Node is a simple wrapper around staticgen which simplifies using this tool in CI-Scenarios.

# npm
npm install -S staticgen-node

# yarn
yarn add staticgen-node

Currently, the latest binaries for linux, osx and windows for amd64 and arm64 are included in the npm package (I might change this in a later version to download the binarys on runtime).

StaticGen-Node also includes a couple of small changes to staticgen to improve the tool for CI, like windows support and all config variables are now also configurable using flags.

Usage

CLI

This package adds a new binary called staticgen which can be used in package.json scripts and using e.g yarn run staticgen

API

This npm package also includes a JS API and typescript definitions. Currently, only synchronous functions are available, promise versions might be added later on.

NOTE: the API can be a bit weird and is build around a specific usecase I have @ snowstorm.

// ES-Modules
import staticgen from "staticgen-node";
// Common-JS
const staticgen = require("staticgen-node");

staticgen.generate();
staticgen.serve();

About

tj's staticgen, conveniently packaged for NodeJS projects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published