-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-prism.min.js
More file actions
1 lines (1 loc) · 2.58 KB
/
build-prism.min.js
File metadata and controls
1 lines (1 loc) · 2.58 KB
1
const fs=require("fs"),path=require("path"),root=__dirname,themes=[{src:"node_modules/prism-themes/themes/prism-a11y-dark.css",dest:"includes/assets/prism-a11y-dark.css"},{src:"node_modules/prism-themes/themes/prism-coldark-cold.css",dest:"includes/assets/prism-coldark-cold.css"},{src:"node_modules/prism-themes/themes/prism-coldark-dark.css",dest:"includes/assets/prism-coldark-dark.css"},{src:"node_modules/prism-themes/themes/prism-dracula.css",dest:"includes/assets/prism-dracula.css"},{src:"node_modules/prism-themes/themes/prism-ghcolors.css",dest:"includes/assets/prism-ghcolors.css"},{src:"node_modules/prism-themes/themes/prism-gruvbox-dark.css",dest:"includes/assets/prism-gruvbox-dark.css"},{src:"node_modules/prism-themes/themes/prism-gruvbox-light.css",dest:"includes/assets/prism-gruvbox-light.css"},{src:"node_modules/prism-themes/themes/prism-material-dark.css",dest:"includes/assets/prism-material-dark.css"},{src:"node_modules/prism-themes/themes/prism-lucario.css",dest:"includes/assets/prism-lucario.css"},{src:"node_modules/prism-themes/themes/prism-night-owl.css",dest:"includes/assets/prism-night-owl.css"},{src:"node_modules/prism-themes/themes/prism-nord.css",dest:"includes/assets/prism-nord.css"},{src:"node_modules/prism-themes/themes/prism-one-dark.css",dest:"includes/assets/prism-onedark.css"},{src:"node_modules/prism-themes/themes/prism-one-light.css",dest:"includes/assets/prism-one-light.css"},{src:"node_modules/prism-themes/themes/prism-shades-of-purple.css",dest:"includes/assets/prism-shades-of-purple.css"},{src:"node_modules/prism-themes/themes/prism-solarized-dark-atom.css",dest:"includes/assets/prism-solarized-dark-atom.css"},{src:"node_modules/prism-themes/themes/prism-synthwave84.css",dest:"includes/assets/prism-synthwave84.css"},{src:"node_modules/prism-themes/themes/prism-duotone-dark.css",dest:"includes/assets/prism-duotone-dark.css"},{src:"node_modules/prism-themes/themes/prism-duotone-light.css",dest:"includes/assets/prism-duotone-light.css"},{src:"node_modules/prism-themes/themes/prism-material-light.css",dest:"includes/assets/prism-material-light.css"},{src:"node_modules/prism-themes/themes/prism-xonokai.css",dest:"includes/assets/prism-xonokai.css"},{src:"node_modules/prism-themes/themes/prism-vsc-dark-plus.css",dest:"includes/assets/prism-vsc-dark-plus.css"}];let success=!0;themes.forEach(({src:s,dest:e})=>{const r=path.resolve(root,s),m=path.resolve(root,e);if(!fs.existsSync(r))return console.error(`✖ Source not found: ${s}`),void(success=!1);fs.mkdirSync(path.dirname(m),{recursive:!0}),fs.copyFileSync(r,m),console.log(`✔ ${s} → ${e}`)}),success||process.exit(1);