This repository has been archived by the owner on Nov 25, 2024. It is now read-only.
Releases: jamesramsay/hercule
Releases · jamesramsay/hercule
5.1.0
Added
- Promise interface for
transcludeString()
andtranscludeFile()
when requiringhercule/promises
. @realityking
5.0.0
Removed
- Removed support for Node.js 8.x
4.1.0
Added
- Add
placeholder
argument to resolver API allowing resolver functions to pass the unmodified content back and skip the link. This allows the default behaviour where unresolvable links throw an error to be overridden with a best-effort approach.
4.0.1
Fixed
- Stack size error caused by a function that returned synchronously in some cases. Files with a thousands of line between transclusion could cause
hercule
to crash.
4.0.0
Added
- New support for alternative transclusion syntaxes including aglio, marked, and multimarkdown through both library and command line interface.
- Command line interface requires input to be explicitly specified, including stdin using
-
or--stdin
. transcludeString()
accepts asource
option, replacing therelativePath
option.TranscludeStream()
,transcludeString()
, andtranscludeFile()
accept aresolvers
option allowing an array of functions to be provided for resolving URL's to input. For example, this could be used to support resolving secured HTTP content or resolving local links within a browser. Please refer to the Resolvers documentation.TranscludeStream()
emits asourcemap
event exactly once with the sourcemap object attached.transcludeString()
andtranscludeFile()
return a sourcemap as the third callback argument. A list of source paths can be extracted from the object.
Changed
TranscludeStream()
now requires a source is specified.TranscludeStream()
andtranscludeFile()
now resolve transclusion links will relative to the specified source.
Removed
TranscludeStream()
,transcludeString()
, andtranscludeFile()
no longer supportrelativePath
option.transcludeString()
andtranscludeFile()
no longer return an array of source paths as the third callback argument.
3.0.0
Improvements
- Errors are now handled consistent with the API style: streams emit errors, async error-first callback, sync throws.
2.0.5
2.0.4
Highlights
- Upgrade dependencies:
[email protected]
and[email protected]
. - Simplified Travis build matrix and improved commit message linting.