Skip to content

Commit

Permalink
fix(both): not working on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ricewind012 committed Feb 5, 2025
1 parent 81b989a commit 60d10c2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/parts/gamelistbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class GameListBar extends Component<
`.${classes.gamelistdropdown.ViewFiltersBar}`,
);
const isButtonSelected = (button: Element) =>
button.classList.contains(classes.gamelistdropdown.Active);
button?.classList.contains(classes.gamelistdropdown.Active);
const getButton = (sel: string) =>
filterButtonsContainer.querySelector(sel)?.parentElement;

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"type": "module",
"scripts": {
"build": "millennium-ttc --build prod",
"build:css": "rm -rf dist && mkdir -p dist && npx postcss --verbose src --base src --dir dist --ext css",
"build:css": "npx postcss --verbose src --base src --dir dist --ext css",
"build:ts-dev": "millennium-ttc --build dev"
},
"devDependencies": {
"@csstools/postcss-sass": "^5.1.1",
"postcss-cli": "^11.0.0",
"postcss-functions": "^4.0.2",
"steam-theming-utils": "^3.1.1"
"steam-theming-utils": "^3.1.2"
},
"dependencies": {
"@steambrew/client": "^4.2.1",
Expand Down
9 changes: 7 additions & 2 deletions postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ import postcssFunctions from "postcss-functions";
import postcssSass from "@csstools/postcss-sass";
import { selectorReplacerPlugin } from "steam-theming-utils/postcss-plugin";

// Generate an index.css file that imports everything
const { argv } = yargs(process.argv);

// Recreate the CSS output directory
fs.rmSync(argv.dir, { recursive: true, force: true });
fs.mkdirSync(argv.dir);

// Generate an index.css file that imports everything
const text = fs
.readdirSync(argv.base, { recursive: true })
.filter((e) => e.endsWith(".scss"))
.map((e) => `@import "${e.replace("scss", "css")}";`)
.map((e) => `@import "${e.replace(/\\/g, "/").replace("scss", "css")}";`)
.join("\n");
fs.writeFileSync(path.join(argv.dir, "index.css"), text);

Expand Down

0 comments on commit 60d10c2

Please sign in to comment.