Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for compiler configuration
Browse files Browse the repository at this point in the history
- Add a new postInit hook
- Update dependencies
- Update GitHub workflows
- Update required Node.js version to 20
GaelGirodon committed May 1, 2024
1 parent 98ebd67 commit e11b3c4
Showing 12 changed files with 360 additions and 261 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -9,12 +9,12 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm

- name: Install dependencies
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file.

## 0.30.0 - 2024-05-XX

- Add support for task lists
- Add support for compiler configuration
- Update dependencies
- Update required Node.js version to 20

## 0.29.0 - 2023-08-29

- Reduce package install size
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ A command-line tool to easily generate HTML documents from Markdown files.
## Install

Install the CLI globally using NPM ([Node.js](https://nodejs.org/) >= 18):
Install the CLI globally using NPM ([Node.js](https://nodejs.org/) >= 20):

```shell
npm install markdown-to-document -g
@@ -159,7 +159,7 @@ The `--extension` option allows to provide paths to extension scripts to
further customize document generation.

An extension is a JavaScript file using ECMAScript modules format with up to
three exported functions corresponding to available hooks, taking an object in
four exported functions corresponding to available hooks, taking an object in
parameter, doing some modifications on it, and returning it.

```js
@@ -171,6 +171,10 @@ export function hookName({ arg1, arg2, ... }) {

These hooks (and their arguments) are available:

- **`postInit`**: called after compiler initialization and before source file
loading
- `mdIt` (`MarkdownIt`): Markdown.it instance, configure it further, or even
load additional plugins with the `.use(...)` method
- **`preCompile`**: called after source file loading and before Markdown
compilation
- `md` (`string`): Markdown document
Loading

0 comments on commit e11b3c4

Please sign in to comment.