Shrinkifier exposes 3 functions: processFromDir
, mkdir
, and rmdir
.
processFromDir
takes one argument, an object with start
and finish
properties that are strings representing the location of the directory of images, and where the processed images will be placed, respectively. The default values are: "./src/temp/unprocessed/"
& "./src/temp/processed"
const { processFromDir, mkdir, rmdir } = require("shrinkifier");
// Use default directories
processFromDir({});
// Or make your own
mkdir("./some/example/path/");
mkdir("./new/image/path/");
processFromDir({ start: "./some/example/path/", finish: "./new/image/path/" });