mdpack is a markdown bundler that enables the composition of markdown and HTML files, treating them similarly to how JavaScript modules are imported. It processes custom `@@import` statements to combine content from various files and can output the bundled result in both markdown and HTML formats. The package, currently at version 0.5.2 (last published in August 2018), provides both a Command Line Interface (CLI) and a Node.js API for programmatic use. Key features include a plugin system, allowing extensions for tasks like HTML minification or adding banners and footers to the bundled output. While the project's README mentions alternatives like `docz` and labels its section on it as "Deprecated" (referring to `docz` or its own aspiration), `mdpack` differentiates itself through its specific custom import syntax and its dual output capabilities for markdown and HTML. Its release cadence is currently inactive, given the last publish date.
npm install mdpackVerified import paths — ran on the pinned version, not inferred.
Demonstrates programmatic use of `mdpack` with a full configuration, including output paths, custom CSS resources, HTML templates, and two plugins (HTML minifier and banner/footer). It also includes setup for dummy files to ensure the example is runnable.
Adhere strictly to the `@@import "<path>"` syntax with double quotes for imports. Ensure the path is correct and accessible relative to the entry file.
Exercise caution when using in production environments. Consider auditing its dependencies for known vulnerabilities and thoroughly testing against your target Node.js version. Be prepared to fork or find alternatives if critical issues arise.
Interpret the 'Deprecated' section as a comparison or commentary on `docz`, not as a statement on the status of `mdpack` itself.
Prefer CommonJS `require()` syntax when importing `mdpack` and its components within Node.js projects, or use a transpiler to handle ESM imports.
Run `npm install mdpack` for local installation or `npm install -g mdpack` if intending to use the CLI globally. If using `npx`, ensure it's available and configured correctly.
Install `mdpack` globally with `npm install -g mdpack` or use `npx mdpack` if it's a project dependency.
Ensure the plugin class is correctly imported and instantiated, and that it's a valid `mdpack` plugin. Double-check the spelling and casing of the plugin name. Custom plugins must be developed to the `mdpack` plugin API.
Ensure all `@@import` statements strictly follow the format `@@import "path/to/file.md"` with double quotes around the file path and no extraneous characters.
No dependency data recorded yet.