build(tailwindcss): only include classes.json in the built plugin files - output.css is not used
All checks were successful
Actions / Build Plugins (pull_request) Successful in 1m15s

This commit is contained in:
cswimr 2024-12-29 17:56:40 -05:00
parent 7341343534
commit 6dc7bc0a8d
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087
2 changed files with 9 additions and 7 deletions

View file

@ -7,7 +7,7 @@
"build": "yarn generate && gauntlet build",
"dev": "gauntlet dev",
"format": "eslint --fix .",
"generate": "node ./generate.js"
"generate": "node ./generate.js && rm -rf ./assets/**/tmp"
},
"dependencies": {
"@project-gauntlet/api": "0.12.0",

View file

@ -4,20 +4,22 @@ import path from "path";
import { fileURLToPath } from "url";
import { execSync } from "child_process";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
try {
execSync(
"yarn dlx tailwindcss -i ./src/tailwindcss/generator/input.css -o ./assets/tailwindcss/generated/output.css",
{ stdio: "inherit" }
"yarn dlx tailwindcss -c ../../../tailwind.config.js -i ./input.css -o ../../../assets/tailwindcss/tmp/output.css",
{
cwd: __dirname,
}
);
} catch (error) {
console.error("Error running tailwindcss: ", error);
}
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const file = fs.readFileSync(
path.join(__dirname, "../../../assets/tailwindcss/generated/output.css"),
path.join(__dirname, "../../../assets/tailwindcss/tmp/output.css"),
"utf8"
);