@nomake/core
v0.2.0
Published
Type-safe build tasks for Deno and Node.js
Readme
NoMake: Type-safe, Multi-lingual and Distributed Build System
NoMake defines build tasks and dependencies in TypeScript, with typed dependency arguments and incremental builds. Build scripts run on Node.js 24.6+ or Deno.
Documentation · Releases · ChangeLog
Quick Start
For Node.js, install NoMake and set "type": "module" in your package.json:
npm install @nomake/[email protected]Create input.txt and a build.ts:
import * as NM from "@nomake/core";
NM.target({
name: "output.txt",
deps: { input: "input.txt" },
async build({ deps, target }) {
const text = await new NM.Path(deps.input).readText();
await new NM.Path(target).writeText(`Hello, ${text}`);
},
});
NM.target({
name: "build",
virtual: true,
rebuild: "always",
deps: ["output.txt"],
});
await NM.makefile();Run node build.ts build. Subsequent runs reuse output.txt until its inputs
or output metadata change. node build.ts help lists virtual targets and options.
For Deno, replace the import with:
import * as NM from "https://raw.githubusercontent.com/thautwarm/nomake/v0.2.0/mod.ts";Then run deno run -A build.ts build. The standalone launcher from
Releases also runs Deno build
scripts with nomake build.
Examples
- Shared Deno/Node build script
- C/C++ with Zig or GCC
- C# native compilation with Bflat
- Git repository archive
- HTTP archive
- Building NoMake itself
License
MIT. See LICENSE.
