diff --git a/bin/tgui-bench.cmd b/bin/tgui-bench.cmd deleted file mode 100644 index 333115f7954..00000000000 --- a/bin/tgui-bench.cmd +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -call "%~dp0\..\tools\build\build.bat" --wait-on-error tgui-bench %* -pause diff --git a/bin/tgui-sonar.cmd b/bin/tgui-sonar.cmd deleted file mode 100644 index e083f65362a..00000000000 --- a/bin/tgui-sonar.cmd +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -call "%~dp0\..\tools\build\build.bat" --wait-on-error tgui-sonar %* diff --git a/code/modules/asset_cache/assets/tgfont.dm b/code/modules/asset_cache/assets/tgfont.dm index efa98e22e2c..956d8220a2e 100644 --- a/code/modules/asset_cache/assets/tgfont.dm +++ b/code/modules/asset_cache/assets/tgfont.dm @@ -1,8 +1,7 @@ /datum/asset/simple/namespaced/tgfont assets = list( - "tgfont.eot" = file("tgui/packages/tgfont/static/tgfont.eot"), - "tgfont.woff2" = file("tgui/packages/tgfont/static/tgfont.woff2"), + "tgfont.woff2" = file("tgui/packages/tgfont/dist/tgfont.woff2"), ) parents = list( - "tgfont.css" = file("tgui/packages/tgfont/static/tgfont.css"), + "tgfont.css" = file("tgui/packages/tgfont/dist/tgfont.css"), ) diff --git a/tgui/packages/tgfont/static/tgfont.css b/tgui/packages/tgfont/static/tgfont.css deleted file mode 100644 index 6bdf310a502..00000000000 --- a/tgui/packages/tgfont/static/tgfont.css +++ /dev/null @@ -1,67 +0,0 @@ -@font-face { - font-family: "tgfont"; - src: url("tgfont.woff2?t=1747971548188") format("woff2"); -} - -[class^="tg-"], -[class*=" tg-"] { - /* biome-ignore lint/complexity/noImportantStyles: Just leave it */ - font-family: "tgfont" !important; - font-size: inherit; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -:root { - /* biome-ignore-start lint/suspicious/noUselessEscapeInString: The escapes are needed */ - --tg-air-tank-slash: "\ea01"; - --tg-air-tank: "\ea02"; - --tg-bad-touch: "\ea03"; - --tg-image-minus: "\ea04"; - --tg-image-plus: "\ea05"; - --tg-nanotrasen-logo: "\ea06"; - --tg-non-binary: "\ea07"; - --tg-prosthetic-full: "\ea08"; - --tg-prosthetic-leg: "\ea09"; - --tg-sound-minus: "\ea0a"; - --tg-sound-plus: "\ea0b"; - --tg-syndicate-logo: "\ea0c"; - /* biome-ignore-end lint/suspicious/noUselessEscapeInString: The escapes are needed */ -} -.tg-air-tank-slash::before { - content: var(--tg-air-tank-slash); -} -.tg-air-tank::before { - content: var(--tg-air-tank); -} -.tg-bad-touch::before { - content: var(--tg-bad-touch); -} -.tg-image-minus::before { - content: var(--tg-image-minus); -} -.tg-image-plus::before { - content: var(--tg-image-plus); -} -.tg-nanotrasen-logo::before { - content: var(--tg-nanotrasen-logo); -} -.tg-non-binary::before { - content: var(--tg-non-binary); -} -.tg-prosthetic-full::before { - content: var(--tg-prosthetic-full); -} -.tg-prosthetic-leg::before { - content: var(--tg-prosthetic-leg); -} -.tg-sound-minus::before { - content: var(--tg-sound-minus); -} -.tg-sound-plus::before { - content: var(--tg-sound-plus); -} -.tg-syndicate-logo::before { - content: var(--tg-syndicate-logo); -} diff --git a/tgui/packages/tgfont/static/tgfont.woff2 b/tgui/packages/tgfont/static/tgfont.woff2 deleted file mode 100644 index 2586080a0d9..00000000000 Binary files a/tgui/packages/tgfont/static/tgfont.woff2 and /dev/null differ diff --git a/tools/build/build.ts b/tools/build/build.ts index 336dc62d44e..f7954f98aa1 100644 --- a/tools/build/build.ts +++ b/tools/build/build.ts @@ -10,7 +10,7 @@ import fs from 'node:fs'; import Bun from 'bun'; import Juke from './juke/index.js'; -import { bun, bunRoot } from './lib/bun'; +import { bun } from './lib/bun'; import { DreamDaemon, DreamMaker, NamedVersionFile } from './lib/byond'; import { downloadFile } from './lib/download'; import { formatDeps } from './lib/helpers'; @@ -94,7 +94,7 @@ export const CutterTarget = new Juke.Target({ const temp_path = `${cutter_path}_temp`; // yes this means its file extension is .exe_temp I don't really care await downloadFile(download_from, temp_path); fs.copyFileSync(temp_path, cutter_path); - fs.rmSync(temp_path) + fs.rmSync(temp_path); if (process.platform !== 'win32') { await Juke.exec('chmod', ['+x', cutter_path]); } @@ -290,7 +290,7 @@ export const BunTarget = new Juke.Target({ parameters: [CiParameter], inputs: ['tgui/**/package.json'], executes: () => { - return bun('install', '--frozen-lockfile', '--ignore-scripts'); + return bun('./tgui', 'install', '--frozen-lockfile', '--ignore-scripts'); }, }); @@ -301,7 +301,7 @@ export const BiomeInstallTarget = new Juke.Target({ return Juke.glob('node_modules/@biomejs/**').length === 0; }, executes: () => { - return bunRoot('install'); + return bun('.', 'install'); }, }); @@ -315,18 +315,7 @@ export const TgFontTarget = new Juke.Target({ 'tgui/packages/tgfont/dist/tgfont.css', 'tgui/packages/tgfont/dist/tgfont.woff2', ], - executes: async () => { - await bun('tgfont:build'); - fs.mkdirSync('tgui/packages/tgfont/static', { recursive: true }); - fs.copyFileSync( - 'tgui/packages/tgfont/dist/tgfont.css', - 'tgui/packages/tgfont/static/tgfont.css', - ); - fs.copyFileSync( - 'tgui/packages/tgfont/dist/tgfont.woff2', - 'tgui/packages/tgfont/static/tgfont.woff2', - ); - }, + executes: () => bun('./tgui/packages/tgfont', 'tgfont:build'), }); export const TguiTarget = new Juke.Target({ @@ -344,23 +333,23 @@ export const TguiTarget = new Juke.Target({ 'tgui/public/tgui-say.bundle.css', 'tgui/public/tgui-say.bundle.js', ], - executes: () => bun('tgui:build'), + executes: () => bun('./tgui', 'tgui:build'), }); export const TguiTscTarget = new Juke.Target({ dependsOn: [BunTarget], - executes: () => bun('tgui:tsc'), + executes: () => bun('./tgui', 'tgui:tsc'), }); export const TguiTestTarget = new Juke.Target({ parameters: [CiParameter], dependsOn: [BunTarget], - executes: () => bun('tgui:test'), + executes: () => bun('./tgui', 'tgui:test'), }); export const BiomeCheckTarget = new Juke.Target({ dependsOn: [BunTarget, BiomeInstallTarget], - executes: () => bunRoot('tgui:lint'), + executes: () => bun('.', 'tgui:lint'), }); export const TguiLintTarget = new Juke.Target({ @@ -369,12 +358,12 @@ export const TguiLintTarget = new Juke.Target({ export const TguiDevTarget = new Juke.Target({ dependsOn: [BunTarget], - executes: ({ args }) => bun('tgui:dev', ...args), + executes: ({ args }) => bun('./tgui', 'tgui:dev', ...args), }); export const TguiAnalyzeTarget = new Juke.Target({ dependsOn: [BunTarget], - executes: () => bun('tgui:analyze'), + executes: () => bun('./tgui', 'tgui:analyze'), }); export const TestTarget = new Juke.Target({ @@ -386,7 +375,7 @@ export const LintTarget = new Juke.Target({ }); export const BuildTarget = new Juke.Target({ - dependsOn: [TguiTarget, DmTarget], + dependsOn: [TguiTarget, TgFontTarget, DmTarget], }); export const ServerTarget = new Juke.Target({ @@ -438,7 +427,7 @@ export const CleanAllTarget = new Juke.Target({ }); export const TgsTarget = new Juke.Target({ - dependsOn: [TguiTarget], + dependsOn: [TguiTarget, TgFontTarget], executes: async () => { Juke.logger.info('Prepending TGS define'); prependDefines('TGS'); diff --git a/tools/build/lib/bun.ts b/tools/build/lib/bun.ts index 951af3f50fd..43297171323 100644 --- a/tools/build/lib/bun.ts +++ b/tools/build/lib/bun.ts @@ -3,26 +3,14 @@ import Juke from '../juke/index.js'; let hasInstallFolder = false; -export function bun(...args: any[]): Promise { +export function bun(dir: string, ...args: any[]): Promise { if (!hasInstallFolder) { - mkdirSync('./tgui/node_modules/', { recursive: true }); + mkdirSync(`${dir}/node_modules/`, { recursive: true }); hasInstallFolder = true; } return Juke.exec('bun', [...args.filter((arg) => typeof arg === 'string')], { - cwd: './tgui', - shell: true, - }); -} - -export function bunRoot(...args: any[]): Promise { - if (!hasInstallFolder) { - mkdirSync('./node_modules/', { recursive: true }); - hasInstallFolder = true; - } - - return Juke.exec('bun', [...args.filter((arg) => typeof arg === 'string')], { - cwd: './', + cwd: dir, shell: true, }); }