refactor(tree-wide): use deno fmt, rename files to .user.less (#1544)
This commit is contained in:
1 parent
544db57f4e
commit
4e271e0bf5
256 files changed
+63157
-61481
No files matched your search
@@ -7,7 +7,7 @@ import core from "@actions/core";
|
||||
import { log } from "@/logger.ts";
|
||||
|
||||
const requiredFiles = [
|
||||
"catppuccin.user.css",
|
||||
"catppuccin.user.less",
|
||||
"preview.webp",
|
||||
];
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@ import stylelintConfig from "../../.stylelintrc.js";
|
||||
|
||||
const args = parseArgs(Deno.args, { boolean: ["fix"] });
|
||||
const userstyle = args._[0]?.toString().match(
|
||||
/(?<base>styles\/)?(?<userstyle>[a-z0-9_\.]+)(?<trailing>\/)?(?<file>catppuccin\.user\.css)?/,
|
||||
/(?<base>styles\/)?(?<userstyle>[a-z0-9_\.]+)(?<trailing>\/)?(?<file>catppuccin\.user\.less)?/,
|
||||
)?.groups?.userstyle;
|
||||
const stylesheets = userstyle
|
||||
? [path.join(REPO_ROOT, "styles", userstyle, "catppuccin.user.css")]
|
||||
? [path.join(REPO_ROOT, "styles", userstyle, "catppuccin.user.less")]
|
||||
: getUserstylesFiles();
|
||||
|
||||
const { userstyles } = getUserstylesData();
|
||||
|
||||
@@ -75,11 +75,20 @@ export async function verifyMetadata(
|
||||
startLine: line !== 0 ? line : undefined,
|
||||
content,
|
||||
});
|
||||
|
||||
if (fix) {
|
||||
content = content.replace(
|
||||
`${atKey} ${current}`,
|
||||
`${atKey} ${expected}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Deno.writeTextFileSync(file, content);
|
||||
|
||||
const template = (await Deno.readTextFile(
|
||||
path.join(REPO_ROOT, "template/catppuccin.user.css"),
|
||||
path.join(REPO_ROOT, "template/catppuccin.user.less"),
|
||||
))
|
||||
.split("\n");
|
||||
|
||||
@@ -169,7 +178,7 @@ function generateAssertions(userstyle: string, userstyles: Userstyles) {
|
||||
: userstyles[userstyle].name
|
||||
}`,
|
||||
author: "Catppuccin",
|
||||
updateURL: `${prefix}/raw/main/styles/${userstyle}/catppuccin.user.css`,
|
||||
updateURL: `${prefix}/raw/main/styles/${userstyle}/catppuccin.user.less`,
|
||||
supportURL: `${prefix}/issues?q=is%3Aopen+is%3Aissue+label%3A${userstyle}`,
|
||||
license: "MIT",
|
||||
preprocessor: "less",
|
||||
|
||||
Reference in new issue
Block a user