info
PurgeTSS is a toolkit for building mobile apps with the Titanium framework. It adds practical utilities to speed up styling and reduce repeated 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 helps you move faster without hand-writing long TSS files.
What it does:
- 23,300+ utility classes for colors, spacing, typography, layout, and more.
- Parses your XML files and writes an
app.tsswith only the classes you actually use. - Customizable via
config.cjs. Supports arbitrary values for one-off sizes and colors. - Icon fonts: Font Awesome, Material Icons, Material Symbols, and Framework7-Icons in Buttons and Labels.
build-fontscommand generatesfonts.tsswith class definitions andfontFamilyselectors for any font you drop in.shadescommand generates color palettes from a hex value.- Animation module: 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.6.2
semanticcommand now works in Classic Titanium projects — writes toResources/semantic.colors.json(Alloy keeps writing toapp/assets/semantic.colors.jsonas before). Existing unrelated entries (the defaultbackgroundColor/textColorthat ship with Classic templates) are preserved in both project types. See Semantic Colors- Fixed a UX bug where the "not an Alloy project" error was immediately followed by the palette preview JSON, making it look like the command half-succeeded.
v7.6.1
- Confirmation prompt for destructive writes in
brandandimages(y/N/afor "always"). Auto-skips whenstdinis not a TTY (alloy.jmk hook, CI, pipes), when-y/--yesis passed, or whenPURGETSS_YES=1is set. Pair withconfirmOverwrites: falseon the matching config section to silence permanently. - Disproportionate-viewBox warning for SVG logos and images — detects viewBoxes above 4096 pt on any side (common in Affinity/Illustrator exports) and rasterizes with adaptive density to stay within Sharp's pixel budget.
- Auto-created
purgetss/{fonts,brand,images}/subfolders on init — the directory structure is self-documenting from the first build. - Unified
::PurgeTSS::output — multi-line command output is now grouped under a single signed header with indented continuation lines (applies acrosspurge,fonts,icon-library,brand,images, and most warnings).
v7.6.0
brandcommand — generate the complete Titanium branding set (launcher icons, adaptive icons, iOS 18+ Dark/Tinted, marketplace artwork, optional notification/splash) from logos auto-discovered in./purgetss/brand/. Works on Alloy and Classic projects. See App icons and brandingimagescommand — generate multi-density UI images (Androidres-*densities + iPhone@1x/@2x/@3xscales) from sources in./purgetss/images/. Subdirectories preserved, short-path scope targeting for re-processing individual files. See Multi-density imagesbrand:andimages:config sections inpurgetss/config.cjs— percentages can be written as'15%'strings for self-documenting clarity; plain numbers also accepted. Auto-injected into older configs on first run.semanticcommand — generate Titanium semantic colors (Light/Dark mode) intoapp/assets/semantic.colors.json. Two modes dispatched by--single: tonal palette (one base hex → 11 shades with mirror inversion + auto config mapping) and single purpose-based color (explicit per-mode hex + optional alpha; the JSON entry AND a class mapping inconfig.cjsare written in one shot — class name auto-derived by stripping theColorsuffix, e.g.surfaceColor→ classsurface). Smart in-place updates when a single name matches an existing palette shade. See Semantic Colors — Generating semantic colors with thesemanticcommand
v7.5.3
- Appearance module — new
Appearanceexport for Light/Dark/System mode switching with persistence. Methods:init(),set(mode),get(),toggle(). See Appearance Setup - Default font family classes —
font-sans,font-serif, andfont-monogenerated automatically with platform-appropriate values - XML validation — detects illegal
--inside XML comments during pre-validation
v7.5.0
extendsupport for Window, View, and ImageView — customize component defaults fromtheme.extendinconfig.cjs- Shorthand
apply—{ apply: '...' }is automatically normalized, so thedefault:wrapper is optional - Property deduplication — applied values win over static defaults instead of duplicating
- Automatic platform resolution — classes inside
ios:/android:blocks find their platform-specific version automatically - Font Awesome 7.2.0
- Fixed:
extend.Windowsilently ignored, duplicatefontproperties, array-type properties missing[ ]notation
v7.4.0
Animation module expansion. 9 new methods bring the module to 15 total:
transition,pulse,sequence,swap,shake,snapTo,reorder,undraggable,detectCollisions- New utility classes:
snap-back,snap-center,snap-magnet,keep-z-index - Delta-based drag for transformed views, position normalization, property inheritance from the Animation object
See the UI Module documentation for full details.
v7.3.0
- BREAKING:
tailwind.tss→utilities.tss— renamed to reflect PurgeTSS's identity as a standalone toolkit - XML syntax validation — pre-validation for Alloy XML files with line numbers and fix suggestions
- Classic Titanium compatibility —
deviceInfo()works without Alloy dependencies
v7.2.7
- Security fixes — command injection in
glob, prototype pollution injs-yaml - Dependency cleanup — reduces installation size by ~45MB, removed unused packages
- Titanium SDK 13.1.0.GA — new utility classes for
navBarColor,forceBottomPosition,multipleWindows
v7.2.6
- Updated Font Awesome to version 7.1.0
- Simplified flag property names in utilities.tss