Files
VDI-Starter/bin/.utils.js
Keith Solomon f4782bc9cd
All checks were successful
Sync TODOs with Issues / sync_todos (push) Successful in 6s
🔵 other: Formatting updates
2026-03-07 19:59:15 -06:00

26 lines
653 B
JavaScript

/**
* Utility functions shared between builds
*/
const fs = require("fs");
const path = require("path");
const distDir = path.resolve(`static/dist`);
const debounce = require("lodash.debounce");
require("dotenv").config();
// Theme root as working directory
const cwd = path.resolve("..");
// Compile Tailwind
module.exports.tailwindToCSS = debounce(() => {
try {
require("child_process").execSync(
`./node_modules/.bin/tailwindcss -i styles/theme.css -o static/dist/theme.css`,
{ stdio: "inherit" }
);
} catch (error) {
console.log(`Error compiling Tailwind to CSS:`, error);
}
}, 50);