ci: fix splitter, add prettier

This commit is contained in:
Cynthia Foxwell 2022-10-18 21:23:37 -06:00
parent 9d028d780b
commit a996b51a7a
2 changed files with 5 additions and 12 deletions

View File

@ -10,11 +10,13 @@ splitter:
before_script:
- apk add --no-cache git
- npm i -g pnpm
- npm i -g prettier
- pnpm i -r
- git config --global user.name "CI"
- git config --global user.email "ci@c7.pm"
script:
- node bin/splitter.js xmc.user.css modular
- prettier --write modular/**/*.css
- git add modular
- git commit -m "Make Modular"
- git push "https://${GITLAB_USER_LOGIN}:${CI_GIT_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" "HEAD:${CI_DEFAULT_BRANCH}"

View File

@ -69,18 +69,9 @@ try {
}
}
const sections = cssUnixEndings.match(/@-moz-document(.*?){\n(.*?\n)}/gs);
if (sections) {
for (const index in sections) {
const section = sections[index];
const content = section.match(/@-moz-document(.*?){\n(.*?\n)}/s)[2];
if (sections.length > 1) {
files["section-" + index] = content;
} else {
files["base"] = content;
}
}
}
files["base"] = cssUnixEndings.match(
/\/\* BASE THEME START\*\/(.*?)\/\* BASE THEME END \*\//gs
)[1];
for (const key of Object.keys(parsed.metadata.vars)) {
const setting = parsed.metadata.vars[key];