This is a TypeScript library for processing Ansible documentation markup. It is named after the Python package of the same name. It is the TypeScript/JavaScript version of the Python antsibull-docs-parser package, which is used by antsibull-docs.
The package is available on npm.
const { parse, toHTML } = require('antsibull-docs');
function convert() {
return toHTML(parse(['First paragraph.', 'Second B(paragraph).']));
}import { parse, toHTML } from 'antsibull-docs';
function convert(): string {
return toHTML(parse(['First paragraph.', 'Second B(paragraph).']));
}After checking out the repository, run
$ npm installto install all required node packages. Afterwards you can run
$ npm buildto build the package as both ESM and CJS,
$ npm build:cjs:watch
$ npm build:esm:watchto start a watch process which builds the package (as CJS or ESM) every time a file is modified,
$ npm testto run the unit tests,
$ npm run test:coverageto run the unit tests and output coverage stats,
$ npm run test:watchto start a watch process which run tests every time a file is modified,
$ npm run test:coverage:watchto start a watch process which run tests every time a file is modified and outputs coverage stats,
$ npm run lintto run the linting,
$ npm run format:checkto check formatting with prettier, and
$ npm run format:writeto re-format the source files.
- Update package version in
package.json(and remove things like-post0). - Create
changelogs/fragments/<version>.ymlwith arelease_summarysection. - Run
rm -rf dist && npm install && npm run build. - Run
npm publish --dry-runand check the output. - Make sure to run
npm run format:write, especially if you updated this README. - Add modified files to git (if they are OK) and commit with message
Prepare <version>.. - Run
antsibull-changelog releaseand add the updated files to git. - Commit with message
Release <version>.and rungit tag <version>. - Run
git push upstream main && git push. - Once CI passes on GitHub, run
npm publish. - On success, do
git push upstream --tagsand create a GitHub release. - Add
-post0to the version inpackage.json, runnpm install, commit asPost-release version bump., and push to GitHub.