Skip to content

v0.1

Choose a tag to compare

@dsisco11 dsisco11 released this 10 Jan 05:33
· 5 commits to master since this release

TinyPreprocessor v0.1.0 — Initial preview (2026-01-09)

A lightweight, extensible preprocessing library for .NET that resolves dependencies, merges resources, and generates source maps.

Highlights

  • Recursive dependency resolution with cycle detection
  • Extensible pipeline: bring your own directive parser, resource resolver, and merge strategy
  • Source maps for tracing generated output back to original sources
  • Diagnostics-first design with “continue on error” support
  • Thread-safe concurrent ProcessAsync calls (isolated per-call state)

What’s included

  • Core abstractions: ResourceId, IResource, IDirective, IDirectiveParser<TDirective>, IResourceResolver
  • Preprocessor orchestrator: Preprocessor<TDirective, TContext>.ProcessAsync(...)
  • Dependency graph: ResourceDependencyGraph (cycle detection + topological ordering)
  • Diagnostics: DiagnosticCollection + built-in diagnostics for common failure modes
  • Source mapping: SourceMap / SourceMapBuilder with query support
  • Default merge strategy: ConcatenatingMergeStrategy<TContext> (concatenation + directive stripping + line mappings)

Install

dotnet add package TinyPreprocessor --version 0.1.0

Requirements

  • .NET 8+ (net8.0)

Notes / Known limitations

  • DeduplicateIncludes is currently effectively always-on (resources are cached per call and won’t be merged multiple times, even if set to false).
  • If cycles are present, a circular-dependency diagnostic is emitted; merged output may be incomplete or not strictly dependency-correct.

Documentation

  • See the docs folder in the repo: core abstractions, diagnostics, dependency graph, source mapping, merge system, and orchestrator design.