Skip to content

Commit

Permalink
Cleans up tgfont build command (tgstation#69786)
Browse files Browse the repository at this point in the history
Co-authored-by: Aleksej Komarov <[email protected]>
  • Loading branch information
AnturK and stylemistake authored Sep 8, 2022
1 parent 3d5fd83 commit c6fb4f3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@
],
"group": "build",
"label": "tgui: sonar"
},
{
"type": "shell",
"command": "bin/tgfont",
"windows": {
"command": ".\\bin\\tgfont.cmd"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: rebuild tgfont"
}
]
}
2 changes: 2 additions & 0 deletions bin/tgfont.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
call "%~dp0\..\tools\build\build.bat" --wait-on-error tg-font %*
7 changes: 6 additions & 1 deletion tools/build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@ export const TgFontTarget = new Juke.Target({
'tgui/packages/tgfont/dist/tgfont.eot',
'tgui/packages/tgfont/dist/tgfont.woff2',
],
executes: () => yarn('tgfont:build'),
executes: async () => {
await yarn('tgfont:build');
fs.copyFileSync('tgui/packages/tgfont/dist/tgfont.css', 'tgui/packages/tgfont/static/tgfont.css');
fs.copyFileSync('tgui/packages/tgfont/dist/tgfont.eot', 'tgui/packages/tgfont/static/tgfont.eot');
fs.copyFileSync('tgui/packages/tgfont/dist/tgfont.woff2', 'tgui/packages/tgfont/static/tgfont.woff2');
}
});

export const TguiTarget = new Juke.Target({
Expand Down

0 comments on commit c6fb4f3

Please sign in to comment.