Skip to content

Instantly share code, notes, and snippets.

View jdalton's full-sized avatar

John-David Dalton jdalton

View GitHub Profile
@jdalton
jdalton / nub-external-subcommands-rfc.md
Created June 27, 2026 02:30
nub: git-style external subcommands (nub-<verb>) — design RFC for nubjs/nub#200

External subcommands (nub-<verb> plugins)

Status: PROPOSAL — pending the maintainer's decision. This documents the design behind the open PR (jdalton:feat/external-subcommandsnubjs/nub, "feat: git-style external subcommand dispatch (nub-<verb>)", [#200], Refs #162). The v0.x status records the proposed ship band, not a settled commitment.

The model

An unknown nub <verb> resolves a binary named nub-<verb> (git/cargo/kubectl style) and runs it, forwarding the remaining argv verbatim:

nub cook ./app.ts --release   →   exec  nub-cook  ./app.ts --release
[
"@antoinerey/comp-Fetch",
"@antoinerey/comp-VideoPlayer",
"@beisen/Accordion",
"@beisen/Approve",
"@beisen/AreaSelector",
"@beisen/AutoComplete",
"@beisen/AutoTree",
"@beisen/BaseButton",
"@beisen/Beaute",
'use strict'
const fs = require('fs')
const path = require('path')
const zlib = require('zlib')
require.extensions['.gz'] =
require.extensions['.js.gz'] = (module, filename) => {
if (path.extname(filename.slice(0, -3)) === '.js') {
let content = zlib.unzipSync(fs.readFileSync(filename)).toString()
node ../lodash-cli/bin/lodash modularize exports=amd -o ./ && node ../lodash-cli/bin/lodash exports=amd -d -o ./main.js