@db-ui/foundations
Advanced tools
Comparing version 0.7.1 to 0.7.2-shell-c96667f
@@ -5,2 +5,8 @@ import { exec } from 'node:child_process'; | ||
import { dirname } from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = dirname(__filename).replaceAll('\\', '/'); | ||
const execAsync = promisify(exec); | ||
@@ -19,3 +25,3 @@ | ||
try { | ||
const files = await glob('**/*.ttf'); | ||
const files = await glob(`${__dirname}/*.ttf`); | ||
const commands = files.map((file) => | ||
@@ -27,3 +33,3 @@ [ | ||
'--flavor=woff2', | ||
'--unicodes-file=unicode-eu.txt', | ||
`--unicodes-file=${__dirname}/unicode-eu.txt`, | ||
`--output-file=${file.replace('.ttf', '-EU.woff2')}` | ||
@@ -30,0 +36,0 @@ ].join(' ') |
@@ -20,5 +20,5 @@ # Generate fonts | ||
```shell | ||
node packages/foundations/assets/fonts/generate-eu-fonts.ts | ||
tsx packages/foundations/assets/fonts/generate-eu-fonts.ts | ||
``` | ||
To check if everything works fine you can check all glyphs with an [opentype.js.org glyph inspector tool](https://opentype.js.org/glyph-inspector.html). |
{ | ||
"name": "@db-ui/foundations", | ||
"version": "0.7.1", | ||
"version": "0.7.2-shell-c96667f", | ||
"type": "module", | ||
@@ -38,2 +38,3 @@ "description": "Provides basic tokens and assets based on DB UX Design System (Version 3).", | ||
"dev": "vite --open", | ||
"generate:fonts": "tsx assets/fonts/generate-eu-fonts.ts", | ||
"generate:icons": "tsx scripts/local/generate-icon-font.ts", | ||
@@ -58,3 +59,3 @@ "prebuild": "npm-run-all copy-prepare:*", | ||
"tsx": "^4.19.2", | ||
"vite": "^6.0.7" | ||
"vite": "^6.0.11" | ||
}, | ||
@@ -61,0 +62,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2632251
21801