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

Function installDemoStyles

tools/build_browser.js:165–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163}
164
165function installDemoStyles() {
166 log("Writing style files.");
167 mkdir("demo/styles");
168 mkdir("demo/styles/base16");
169
170 glob.sync("**", { cwd: "./src/styles" }).forEach((file) => {
171 const stat = fss.statSync(`./src/styles/${file}`);
172 if (stat.isDirectory()) return;
173
174 if (file.endsWith(".css")) {
175 installCleanCSS(`./src/styles/${file}`, `demo/styles/${file}`);
176 } else {
177 // images, backgrounds, etc
178 install(`./src/styles/${file}`, `demo/styles/${file}`);
179 }
180 });
181}
182
183const builtInLanguagesPlugin = (languages) => ({
184 name: "hljs-index",

Callers 1

installDemoFunction · 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…