Releases: macCesar/purgeTSS
v7.1.8
What's New in v7
Major Refactoring & ESM Migration: PurgeTSS v7.1 has been completely refactored with improved code organization, better ESM compatibility, enhanced error handling, and a more intuitive CLI experience.
⚠️ Breaking Changes
- Node.js 16+ required (ESM support)
- Configuration file:
config.js
→config.cjs
(same content, different extension for CommonJS compatibility) - Removed deprecated commands:
copy-fonts
(useicon-library
instead)build-legacy
(legacy Tailwind build removed)
- Complete legacy mode removal:
- All legacy-related code and conditional checks eliminated
- Legacy mode no longer supported anywhere in the codebase
purge.options.legacy
configuration option completely removed
- Simplified font generation:
build-fonts
-p
flag removed (now handled by-f
flag)build-fonts
command options simplified for better consistency
- Updated dependencies to latest ESM versions (chalk v5+, etc.)
✅ What's Maintained
- Same CLI interface - All commands and options preserved
- 100% API compatibility - All existing commands work the same
- Same configuration structure - Your existing config content works unchanged
🔄 Command Improvements
- Enhanced CLI error handling: Improved error messages with command suggestions when unknown commands are entered
- CLI reorganization: Commands are now organized in logical categories (Setup, Development, Assets, Utilities, Maintenance) for better discoverability
build-fonts
simplified:- Removed
-p
(--icon-prefix-from-filename) flag - The
-f
flag now controls both font class names AND icon prefixes using filenames - More consistent and intuitive behavior
- Removed
- Internal code modularization: Refactored monolithic helper files into specialized modules for better maintainability
- Complete legacy mode removal: Removed
build-legacy
command and all legacy-related code for cleaner, modern codebase
🔧 Migration Guide
For most users, upgrading is seamless:
npm install -g purgetss@latest
Key changes to note:
- Only requirement: Node.js 16 or higher
- If you used the
build-legacy
command, use the regularbuild
command instead - Enhanced CLI: Unknown commands now provide helpful suggestions instead of generic errors
- If you had
legacy: true
in your config, remove this option (legacy mode completely discontinued) - If you used
build-fonts
with the-p
flag, now use-f
instead (handles both font classes and icon prefixes)
v6.2.47
open
andclose
Animation methods. These methods provide explicit control over the animation states, unlike the play and toggle methods that alternate states- Fix
bounds
handling anddraggable
behavior - Re-order classes only in
apply
,class
,classes
,icon
, oractiveIcon
properties in XML or JS files, for the Tailwind RAW Reorder VSCode Extension - Using the latest completions file with SDK 12.3.1.GA, including new properties like
breakStrategy
andhyphenationFrequency
. - Updated dependencies like TailwindCSS v3.4.4 or FontAwesome Free v6.5.2
- Several bug fixes.
v6.2.43
Full Changelog: v6.2.41...v6.2.43
fractions in arbitrary values
- Handle Fractions in Arbitrary Values: Now, you can use fractions in most spacing properties such as
margins
,widths
,heights
,padding
, etc. For example, you can set the width and height of an element like this:w-(1/7) h-(4/7)
or its margins like this:mx-(1/9)
. - Add
--prefix
Option to thebuild-fonts
Command: Apply the style's filename as the prefix in icon fonts for both thefonts.tss
andpurgetss.fonts.js
files.
v6.2.38
New --dependencies
option when creating a new project:
> purgetss create 'Name of the Project' --dependencies
# alias:
> purgetss c 'Name of the Project' -d
The introduction of the --dependencies
option within the create
command offers a profound enhancement to the setup process for projects using PurgeTSS with Titanium SDK.
This option not only installs essential tools like ESLint for code quality and Tailwind CSS for efficient UI development but also ensures seamless integration with the Visual Studio Code (VSCode) environment.
Here's a closer look at the recommended VSCode extensions and their roles:
-
XML Tools: For XML formatting.
-
ESLint: To ensure consistent code quality, enforcing coding standards and identifying issues in real-time.
-
Tailwind CSS IntelliSense: Intelligent PurgeTSS classes support.
-
Tailwind RAW Reorder: An opinionated class sorter, it optimizes the arrangement of PurgeTSS classes for better readability and maintenance.
-
Intellisence for CSS class names in HTML: PurgeTSS class name completion based on definitions within your workspace (
purgetss/config.js
), for example, all available classes in thefonts.tss
andtailwind.tss
files.
New install-dependencies
command for existing projects:
> purgetss install-dependiencies
# alias:
> purgetss id
This command is specifically designed for existing projects that are already using PurgeTSS. It simplifies the process of installing the aforementioned dependencies and configuration files into your current project, enhancing your development workflow without the need to recreate your project from scratch.
Please note that this command will overwrite any existing extensions.json
and settings.json
files, so it's advisable to create a backup if you wish to preserve them.
While the --dependencies
option of the create
command simplifies the initial project setup, the new install-dependencies
command makes it easier than ever to enhance your development workflow in existing projects.
6.2.36
- remove unneded grays from
referenceColorFamilies
- generate separate color classes for
tint
andtintColor
- filter
#
from class names to properly purgeids
inView
files - add
override
option to the shades command - new Arbitrary Values:
- 'target-image-w': 'targetImageWidth: {value}',
- 'target-image-h': 'targetImageHeight: {value}',
- 'badge-bg': 'badgeBackgroundColor: {value}',
- 'badge-text': 'badgeTextColor: {value}',
- 'cancel': 'cancel: {value}',
- 'destructive': 'destructive: {value}',
- 'index': 'index: {value}',
- 'max': 'max: {value}',
- 'maximum': 'maximum: {value}',
- 'minimum': 'minimum: {value}',
- 'preferred': 'preferred: {value}',
- 'tint-color': 'tintColor: {value}',
- 'tint': 'tint: {value}',
- 'value': 'value: '{value}'',
Misc Changes
- update
chroma-js
v2.4.2 used by theshades
command - console log error message now shows: line, column and char
- update
completions
file 12.2.1.GA - filter valid class names in
filterCharacters
function
v6.2.30
Update PurgeTSS with latest SDK 12.2.0.GA
-
Updated properties that target new and existing components:
duration
: CameraRecordingCallbackkeyboardDismissMode
: Ti.UI.TableViewrecording
: CameraOptionsTypescalingMode
: Ti.UI.ImageViewsecure
: Ti.Network.Socket.TCPwidth
&height
: CameraOpen
-
New properties for new and existing components:
- CameraOptionsType
targetImageHeight
targetImageWidth
videoQuality
zoomEnabled
- Ti.UI.ListView
forceUpdates
- Ti.UI.Tab
badgeBackgroundColor
badgeTextColor
- Ti.UI.TabGroup
tabMode
- Ti.UI.TableViewRow
filterAlwaysInclude
- Ti.Media
aspectRatio
torch
useCameraX
- CameraOptionsType
-
Deprecated properties or removed constants:
badgeColor
Ti.Media.AUDIO_STATE_WAITING_FOR_QUEUE
-
Remove unnecessary classes for the boolean property:
scalesPageToFit
Breaking Change
-
Rename
vertical-align-[top|bottom|center]
classes tovertical-align-text-[top|bottom|center]
for theverticalAlign
constants:Ti.UI.TEXT_VERTICAL_ALIGNMENT_[TOP|BOTTOM|CENTER]
-
New
verticalAlign
constants:Ti.Media.VERTICAL_ALIGN_[TOP|BOTTOM|CENTER]
'.vertical-align-center': { verticalAlign: Ti.Media.VERTICAL_ALIGN_CENTER }
'.vertical-align-top': { verticalAlign: Ti.Media.VERTICAL_ALIGN_TOP }
'.vertical-align-bottom': { verticalAlign: Ti.Media.VERTICAL_ALIGN_BOTTOM }
'.vertical-align-text-bottom': { verticalAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_BOTTOM }
'.vertical-align-text-center': { verticalAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_CENTER }
'.vertical-align-text-top': { verticalAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP }
Bug Fixes and Updates
- Added new Arbitrary Values for properties such as
badgeBackgroundColor
,badgeTextColor
,targetImageHeight
, andtargetImageWidth
. - The
shades
command now generates a color variant: 950. - Added the
--override
or-o
option to theshades
command, allowing you to place new shades intheme.colors
to override default colors. - Enhanced error handling when using PurgeTSS outside of Alloy projects.
- Removed the
fonts
command and deprecated thecopy-fonts
command. - Introduced a new
icon-library
command to copy official icon font libraries: Font Awesome, Material Icons, Material Symbols, or Framework7 Icons. - Fixed the issue with copying the appropriate style files from the official icon fonts using
purgetss icon-library --vendor=[fa,md,mi,f7] --styles
.
6.2.29
- Update PurgeTSS description and key features
- Fix copying the correct
tss
files of the icon fonts - Enhanced error handling when using PurgeTSS outside of Alloy projects
- Remove
fonts
command - Add new
icon-library
command to copy official icon font libraries: Font Awesome, Material Icons, Material Symbols or Framework7 Icons
v6.2.28
v6.2.27
- update Tailwind v3.3.3
- update FontAwesome v6.4.2
- update completions file v12.1.2.GA
- fix trailing comma in shadow ( arbitrary values )
- all caps for #FFFFFF values
- new moveByProperties method when dragging objects using the Animation Module
- new moveByProperties classes
- new styles for the style property of the Titanium.UI.AlertDialog