This script helps you copy Tegel design system assets (fonts and logos) to your application's public directory.
- Node.js installed
- Tegel package installed in your project (@scania/tegel)
Run the script using npx: npx copy-assets
By default, this will copy assets to ./public/assets
in your project root.
To copy assets to a different directory, provide the path as an argument: npx copy-assets custom/assets/path
The script script handles path separators correctly because it uses Node.js's path module, which automatically handles path separators for the current operating system. But if Windows users experience problems they can use backward slashes when specifying paths:
npx copy-assets custom/assets/path ❌
npx copy-assets custom\assets\path ✅
The script will copy:
- Cyrillic fonts to /fonts/cyrillic/
- Latin fonts to /fonts/latin/
The following logos will be copied to /logos/:
- scania-wordmark-white.svg
- scania-symbol.svg
- scania-symbol.png
After running the script:
- Check the console output for any warnings or errors
- Verify that the assets have been copied to the target directory
- Ensure your application is configured to serve static files from the target directory
If you encounter issues:
- Verify that the Tegel package is properly installed
- Check if your target directory is writable
- Review console output for specific error messages