gram/packages/modules
Repository files (latest commit first)
Filename Latest commit message Latest commit date
abiwab ceed6df413
All checks were successful
CI / Build & Test (pull_request) Successful in 5m25s
chore: release v1.4.1
2026-11-14 11:33:25 +01:00
..
src feat(docs): update homepage previews, review scheduling docs and polish renderer styles 2026-11-11 21:43:25 +01:00
tests fix(kitchen): register display name for scoped intermediates 2026-09-29 11:44:57 +02:00
CHANGELOG.md chore: release v1.4.1 2026-11-14 11:33:25 +01:00
package.json chore: release v1.4.1 2026-11-14 11:33:25 +01:00
README.md docs: refresh the package readmes for 1.4.0 2026-11-12 23:02:50 +01:00
tsconfig.json feat(modules): scaffold @gram-lang/modules — host interface, exports, graph loader 2026-08-17 18:56:18 +02:00

@gram-lang/modules

License: GPL v3

Part of the Gram monorepo.

Resolves and composes @use import directives. Loads a document's import graph, computes each module's public exports and yield, renames its intermediates to avoid collisions with the host, and splices its sections into a single composed AST — so the whole document is compiled, and ALAP-scheduled, exactly once.

This package defines the host interface (ModuleHost) and implements none that touches a disk: file resolution and reading are the caller's job (CLI, language server, conformance runner), so this package stays pure — no built-in Node APIs, no filesystem access of its own. The one host it ships is createMemoryHost(), an in-memory ModuleHost for places with no real filesystem, like the playground, where a base recipe and its importer can be edited side by side.


Licensed under GPL-3.0-or-later.