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

Function installCleanCSS

tools/lib/makestuff.js:29–38  ·  view source on GitHub ↗
(file, dest, opts = {})

Source from the content-addressed store, hash-verified

27`.trim();
28
29function installCleanCSS(file, dest, opts = {}) {
30 // default is to minify
31 // eslint-disable-next-line no-undefined
32 const minify = opts.minify === undefined ? true : opts.minify;
33
34 const theme = fs.readFileSync(file, { encoding: "utf8" });
35 const content = DEFAULT_CSS + "\n" + theme;
36 const out = new CleanCSS(minify ? config.clean_css : config.clean_css_beautify).minify(content).styles;
37 fs.writeFileSync(`${process.env.BUILD_DIR}/${dest}`, out);
38}
39
40function mkdir(dirname) {
41 fs.mkdirSync(`${process.env.BUILD_DIR}/${dirname}`, { recursive: true });

Callers 3

installStylesFunction · 0.85
buildNodeFunction · 0.85
installDemoStylesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…