Advanced Rebranding
Extending the rebrand engine for custom requirements.
Overview
While the built-in rebrand engine covers most use cases, you may need to extend it to handle custom assets, additional string replacements, or complex feature toggling.
Extending the Engine
1. Custom String Replacements
You can add additional search-and-replace patterns to the build-rebrand.sh script. Look for the section labeled # String Replacement and add your own sed commands:
# Example: Replace a custom placeholder
find . -type f -name "*.tsx" -exec sed -i 's/CUSTOM_PLACEHOLDER/MyValue/g' {} +
2. Custom Asset Injection
If you have additional assets (e.g., custom fonts or extra icons), you can add a copy command to the # Asset Management section:
# Example: Copy custom fonts
cp -r ../../../rebrand/assets/fonts/* ./public/fonts/