workflow-build-runner is a small Node.js runtime for repository-local build.js
files that replace legacy build.xml driven workflows.
It provides:
defineBuild(...)for declaring a build definitionsequence([...])for ordered target executionworkflowTargetswith the current Geonovum workflow target implementationsworkflowTargets.custom.xslt(...)for repository-local XSLT steps with CLI context paths- a
workflow-build-runnerCLI for executing a build definition
npm install @geonovum/workflow-build-runner"use strict";
const workflowBuild = require("@geonovum/workflow-build-runner");
module.exports = workflowBuild.defineBuild({
defaultTarget: "main",
targets: {
init: workflowBuild.workflowTargets.word.common.init,
unzip: workflowBuild.workflowTargets.word.common.unzip,
ruimop: workflowBuild.workflowTargets.word.common.ruimop,
config: workflowBuild.workflowTargets.word.common.config,
respec: workflowBuild.workflowTargets.word.markdown.respec,
main: workflowBuild.sequence(["init", "unzip", "ruimop", "config", "respec"])
}
});Generic XSLT target example:
const workflowBuild = require("@geonovum/workflow-build-runner");
module.exports = workflowBuild.defineBuild({
defaultTarget: "main",
targets: {
transform: workflowBuild.workflowTargets.custom.xslt({
stylesheet: "mijn-transform.xsl",
source: "input.xml",
output: "output.html",
params: {
"mijn-param": "waarde",
},
}),
main: workflowBuild.sequence(["transform"]),
},
});Path resolution for workflowTargets.custom.xslt(...):
stylesheetis resolved relative tobuildRootsourceis resolved relative toinputDiroutputis resolved relative tooutputDirparamsaccepts either an inline object or a JSON file path relative tobuildRoot
workflow-build-runner \
--buildfile path/to/build.js \
--repo path/to/workflow-repo \
--input path/to/input \
--output path/to/output \
--temp path/to/tempThe CLI also accepts a build.xml path and resolves it to the sibling build.js.
- This package depends on
saxon-js,xslt3andzip-lib. - Some workflows try to use the
tidybinary when generating XHTML snapshots. If it is not available, the runner falls back to copying the HTML file.
This project is licensed under Apache-2.0. See LICENSE.
Local validation:
npm run prepublish:checkVersioning:
npm run changesetPublishing is handled by GitHub Actions through Changesets:
- pushes to
maincreate or update the version PR, or publish when a version commit is merged - the
Releaseworkflow can also be started manually withworkflow_dispatch