Changed the data stuff from db to source and changed the dist.css name to import.css because more userfriendliness(tm) hopefully not nuking everything, i kept the old dist so i dont also nuke the import link for everyone
This commit is contained in:
parent
9988b98f03
commit
4868f921dd
7 changed files with 11 additions and 10 deletions
2
.github/scripts/convert/index.mjs
vendored
2
.github/scripts/convert/index.mjs
vendored
|
|
@ -28,7 +28,7 @@ for (let i = 0; i < avis.length; i++) {
|
|||
}
|
||||
|
||||
await writeFile(
|
||||
join("../../", "db", "data.json"),
|
||||
join("../../", "source", "data.json"),
|
||||
format(
|
||||
JSON.stringify({
|
||||
avatars,
|
||||
|
|
|
|||
8
.github/scripts/generate/index.mjs
vendored
8
.github/scripts/generate/index.mjs
vendored
|
|
@ -8,7 +8,7 @@ const uglify = !process.argv.includes("--debug");
|
|||
|
||||
console.log("Getting templates...");
|
||||
const templateLines = (
|
||||
await readFile(join("../../", "db", "template.css"), "utf8")
|
||||
await readFile(join("../../", "source", "template.css"), "utf8")
|
||||
)
|
||||
.replace(/\r/g, "")
|
||||
.split("\n");
|
||||
|
|
@ -31,9 +31,9 @@ for (const id of Object.keys(templates)) {
|
|||
else throw new Error(`Failed to get template lines for: ${id}`);
|
||||
}
|
||||
|
||||
console.log("Generating dist.css...");
|
||||
console.log("Generating import.css...");
|
||||
const data = JSON.parse(
|
||||
await readFile(join("../../", "db", "data.json"), "utf8")
|
||||
await readFile(join("../../", "source", "data.json"), "utf8")
|
||||
);
|
||||
|
||||
const dist = [];
|
||||
|
|
@ -46,7 +46,7 @@ for (const [bid, img] of Object.entries(data.badges)) {
|
|||
}
|
||||
|
||||
await writeFile(
|
||||
join("../../", "db", "dist.css"),
|
||||
join("../../", "source", "import.css"),
|
||||
uglify ? UglifyCSS.processString(dist.join("\n")) : dist.join("\n\n")
|
||||
);
|
||||
|
||||
|
|
|
|||
10
.github/workflows/generate-db.yml
vendored
10
.github/workflows/generate-db.yml
vendored
|
|
@ -5,10 +5,10 @@ on:
|
|||
branches:
|
||||
- main
|
||||
paths:
|
||||
- ".github/workflows/generate-db.yml"
|
||||
- ".github/workflows/generate-source.yml"
|
||||
- ".github/scripts/generate/**/*.*"
|
||||
- "db/data.json"
|
||||
- "db/template.css"
|
||||
- "source/data.json"
|
||||
- "source/template.css"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
|
@ -50,6 +50,6 @@ jobs:
|
|||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
git add db/dist.css
|
||||
git commit -m "chore(db): update dist.css (${{ github.sha || 'manual trigger' }})" || true
|
||||
git add source/import.css
|
||||
git commit -m "Update import.css (${{ github.sha || 'manual trigger' }})" || true
|
||||
git push
|
||||
|
|
|
|||
1
source/dist.css
Normal file
1
source/dist.css
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue