Boilerplate with Maki Module

TL;DR: Make flexible and consistent folder-based modular boilerplate with Maki Module :)


In programming there is boilerplate:

sections of code that have to be included in many places with little or no alteration.

Wikipedia

Since most things being made follow a pattern of things made before them, boilerplate gives a project consistency and sets the expectations of what you may find in other files, functions, classes, etc.

Continue reading “Boilerplate with Maki Module”

Shell commands with Node

Running CLI Node scripts, capture the return value of a shell command:

const execSync = require('child_process').execSync;
const nodeVer = execSync('node -v', { encoding: 'utf8' });

Shell command reports in the CLI:

const execSync = require('child_process').execSync;
execSync('npm -g ls', { stdio: 'inherit' });