info
PurgeTSS is a toolkit for building mobile apps with the Titanium framework. It adds practical utilities for styling and setup work.
It includes utility classes, icon font support, an Animation module, a simple grid system, and the shades command for generating custom colors.
If you build UI-heavy screens, PurgeTSS keeps you from hand-writing long TSS files.
What it does:
- 23,300+ utility classes for colors, spacing, typography, layout, and more.
- Parses XML files and writes an
app.tsswith only the classes you use. - Customizable through
config.cjs, with arbitrary values for one-off sizes and colors. - Icon fonts for Buttons and Labels: Font Awesome, Material Icons, Material Symbols, and Framework7-Icons.
build-fontscommand generatesfonts.tsswith class definitions andfontFamilyselectors for any font you drop in.shadescommand generates color palettes from a hex value.- Animation module with 2D transforms, draggable views with collision detection, sequential animations, and position utilities.
- Grid system for aligning and distributing elements in rows and columns.
Table of Contents
- Installation
- Commands
- App Assets
- Customization
- The UI Module
- Best Practices
- Grid System
Changelog
v7.11.1
- Fixes for the SVG image pipeline from v7.11.0: width/height now cascade symmetrically (the unpinned side derives from the
viewBoxon every run instead of getting cemented inconfig.cjs),syncConfigImagesmirrors the current run so shrinking a class actually shrinks the entry, and SVGs listed inimages.filesalways emit PNG to match Titanium's runtime fallback. purgetss imagesrespects--yesfor overwrite confirmations, andsyncConfigImagesno longer bumpsconfig.cjsmtime on untouched runs (which was triggering needlessutilities.tssrebuilds).- Restored
src/dev/builders/tailwind-builder.js— it was the entry point fornpm run build:tailwind, deleted as "orphan" by mistake in 7.11.0.
v7.11.0
- SVG-aware compile-time image pipeline as a post-step of
purgetss. When views or controllers referenceimage="/images/<sub>/<name>.svg"alongside utility classes that resolve to numeric width/height (w-32,w-(300),h-auto, …), purge now compiles those SVGs into the 8 Titanium density variants (5 Android + 3 iPhone PNGs) using dimensions resolved fromapp.tss. Titanium loads the generated.pngautomatically at runtime; the SVG attribute in your source is never rewritten. See SVG-aware image pipeline. - New
images.filesarray inconfig.cjsto pin width/height per file, plusimages.autoSync(defaulttrue) for devs who want to manageimages.filesby hand. config.cjssyntax validator: type mismatches in known fields (theme.fontFamily.*,theme.extend.fontFamily.*) print a formattedConfig Syntax Errorblock with file, JSON path, and a fix snippet — instead of cryptic downstream crashes likerule.startsWith is not a function.
v7.10.2
- Configs written before v7.7.0 (the
brand:regroup) now auto-migrate in memory on every run. The legacy flat layout used to crash auto-purge withTypeError: Cannot create property 'ios' on number '15';getConfigFile()now normalizes them to the grouped layout before applying defaults. See Upgrading from pre-7.7.0 configs. - Internal fix:
logger.warningandlogger.successare now defined — the ~40 callsites acrossbrand,images,cleanup-legacy, andsvg-utilsno longer throwTypeError: logger.warning is not a functionwhen those opt-in commands run.
→ See the full changelog for older releases (v7.10.1 and earlier).