diff --git a/package.json b/package.json index ca02ca1..682d89e 100644 --- a/package.json +++ b/package.json @@ -148,9 +148,10 @@ "## _:... == sub-scripts ('hidden'; generally should be run 'silently' using `run-s/run-p --silent ...`": "", "_:debug:env": "node -e \"console.log({env: process.env})\"", "_:exists:git-changelog": "node -e \"if (!require('command-exists').sync('git-changelog')){process.exit(1);};\" || ( shx echo \"WARN `git-changelog` missing (try `go get -u github.com/rivy-go/git-changelog/cmd/git-changelog`)\" & exit 1 )", - "_:help": "< package.json node -e \"s = {p:'',e:'npm'}; if (new String(process.env.npm_execpath).match(/yarn.js$/)) { s = {p:'\\n',e:'yarn'}; }; console.log('%susage: \\`%s run TARGET\\` or \\`npx run-s TARGET [TARGET..]\\`\\n\\nTARGETs:\\n', s.p, s.e); re = /^.*?\\x22(?:\\W+\\s*)([^#\\x22]+)\\s+#+\\s+([^#\\x22]+?)(\\s+#+)?\\x22.*$/; require('readline').createInterface({ input: process.stdin, output: process.stdout, terminal: false }).on('line', function(line){ if (match = re.exec(line)) { console.log('%s %s', match[1].padEnd(19), match[2]); } });\"", + "* _:help # print usage/TARGETs by matching lines containing leading double-quoted text like `# TARGET_NAME # HELP_TEXT`": "", + "_:help": "< package.json node -e \"s = {p:'',e:'npm'}; if (new String(process.env.npm_execpath).match(/yarn.js$/)) { s = {p:'\\n',e:'yarn'}; }; console.log('%susage: \\`%s run TARGET\\` or \\`npx run-s TARGET [TARGET..]\\`\\n\\nTARGETs:\\n', s.p, s.e); re = /^.*?\\x22(?:#\\s*)(\\w[^#\\x22]*)\\s+#+\\s+([^\\x22]+?)(\\s+#+)?\\x22.*$/; require('readline').createInterface({ input: process.stdin, output: process.stdout, terminal: false }).on('line', function(line){ if (match = re.exec(line)) { console.log('%s %s', match[1].padEnd(19), match[2]); } });\"", "_:lint:commits:all:spell": "node -e \"result=require('child_process').spawnSync('git log --color=never | cspell stdin --no-summary --config \".vscode/cspell.json\"',{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('[cspell] ERR! Unknown words in commit(s)\\n'+result.stdout+'\\n'+result.stderr); process.exit(1);} else {console.log(result.stdout);};\"", - "# _:lint:commits:new:... * note: review from 'origin/last' or tag just prior to version-sorted latest, with fallback to first commit": "", + "* _:lint:commits:new:... * note: review from 'origin/last' or tag just prior to version-sorted latest, with fallback to first commit": "", "_:lint:commits:new:commitlint": "node -e \"result=require('child_process').spawnSync('( git tag --list [#v]* --contains origin/last --sort=v:refname || shx true ) && ( git describe --tags --abbrev=0 HEAD~1 || shx true ) && ( git rev-list --max-parents=0 HEAD --abbrev-commit --abbrev=16 || shx true )',{shell:true,encoding:'utf-8'}); o=result.stdout.split(/\\r?\\n/).filter((s)=>!!s); vs=o; v=vs[0]; result=require('child_process').spawnSync('commitlint --config .commitlint.config.js --from '+v,{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('[commitlint] ERR! Flawed commit(s) found (within \\'%s..HEAD\\')\\n'+result.stdout+'\\n'+result.stderr, v); process.exit(1);} else { (result.stdout.length > 0) && console.log(result.stdout);};\" || shx true", "_:lint:commits:new:spell": "node -e \"result=require('child_process').spawnSync('( git tag --list [#v]* --contains origin/last --sort=v:refname || shx true ) && ( git describe --tags --abbrev=0 HEAD~1 || shx true ) && ( git rev-list --max-parents=0 HEAD --abbrev-commit --abbrev=16 || shx true )',{shell:true,encoding:'utf-8'}); o=result.stdout.split(/\\r?\\n/).filter((s)=>!!s); vs=o; v=vs[0]; result=require('child_process').spawnSync('git log '+v+'.. --color=never | cspell stdin --no-summary --config \".vscode/cspell.json\"',{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('[cspell] ERR! Unknown words in commit(s) (within \\'%s..HEAD\\')\\n'+result.stdout+'\\n'+result.stderr, v); process.exit(1);} else {(result.stdout.length > 0) && console.log(result.stdout);};\" || shx true", "_:show:deps:dev": "npm --silent ls --only development || shx true",