| name | blahpack-scaffold |
| description | Generate the stdlib-js module scaffold for a BLAS/LAPACK routine |
| argument-hint | <routine> |
Generate the stdlib-js module scaffold for a BLAS/LAPACK routine. Run:
python bin/scaffold.py $ARGUMENTS
The first argument is the package (blas or lapack), the second is the routine name. Add -d "description" for the one-line description.
If the user provides just a routine name, determine the package by checking whether the source exists in data/BLAS-3.12.0/ (blas) or data/lapack-3.12.0/SRC/ (lapack).
The scaffold generates 16 files:
lib/base.js — stub with correct signature (implement this)
lib/ndarray.js — validation wrapper for stdlib string params (uplo, trans, diag, side)
lib/<routine>.js — layout wrapper with isLayout, string, dimension, and LD validation
lib/main.js, lib/index.js — entry points
test/test.js — export/arity checks
test/test.<routine>.js — layout wrapper validation tests
test/test.ndarray.js — scaffold for ndarray computation tests
benchmark/benchmark.js, benchmark/benchmark.ndarray.js
docs/types/index.d.ts — dual signatures with @stdlib/types imports
docs/types/test.ts — TypeScript compile-time tests
docs/repl.txt, README.md, examples/index.js, package.json (with keywords)
LEARNINGS.md — template
After scaffolding, the translator only needs to:
- Implement
lib/base.js
- Write real tests in
test/test.ndarray.js
- Add manual validation in
ndarray.js for nonstandard string params (job, norm, etc.)
- Fill in LEARNINGS.md