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

Function installStyles

tools/build_cdn.js:135–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133}
134
135function installStyles() {
136 log("Writing style files.");
137 mkdir("styles/base16");
138
139 glob.sync("**", { cwd: "./src/styles" }).forEach((file) => {
140 const stat = fss.statSync(`./src/styles/${file}`);
141 if (stat.isDirectory()) return;
142
143 if (file.endsWith(".css")) {
144 installCleanCSS(`./src/styles/${file}`, `styles/${file}`, { minify: false });
145 installCleanCSS(`./src/styles/${file}`, `styles/${file.replace(".css", ".min.css")}`, { minify: true });
146 } else {
147 // images, backgrounds, etc
148 install(`./src/styles/${file}`, `styles/${file}`);
149 }
150 });
151}
152
153async function buildDistributable(language, options) {
154 const filename = `${language.name}.min.js`;

Callers 1

buildCDNFunction · 0.85

Calls 4

mkdirFunction · 0.85
installCleanCSSFunction · 0.85
installFunction · 0.85
logFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…