MCPcopy
hub / github.com/highlightjs/highlight.js / buildESMUtils

Function buildESMUtils

tools/build_node.js:70–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68const EXCLUDE = ["join"];
69
70async function buildESMUtils() {
71 const input = { ...config.rollup.core.input, input: `src/lib/regex.js` };
72 input.plugins = [...input.plugins, {
73 transform: (code) => {
74 EXCLUDE.forEach((fn) => {
75 code = code.replace(`export function ${fn}(`, `function ${fn}(`);
76 });
77 return code;
78 }
79 }];
80 await rollupWrite(input, {
81 ...config.rollup.node.output,
82 format: "es",
83 file: `${process.env.BUILD_DIR}/es/utils/regex.js`
84 });
85}
86
87async function buildNodeHighlightJS(options) {
88 const input = { ...config.rollup.core.input, input: `src/highlight.js` };

Callers 1

buildNodeFunction · 0.85

Calls 1

rollupWriteFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…