purgetss 5.3.9 → 5.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,552 +2,44 @@
2
2
  <img src="https://codigomovil.mx/images/logotipo-purgetss-gris.svg" height="230" width="230" alt="PurgeCSS logo"/>
3
3
  </p>
4
4
 
5
- **PurgeTSS** is a package for all [Titanium SDK developers](https://tidev.io/), who want to easily and quickly create beautifully designed mobile apps.
6
-
7
- <p align="center">
8
- <a href="https://www.npmjs.com/package/purgetss" target="_blank">
9
- <img alt="npm" src="https://img.shields.io/npm/dm/purgetss">
10
- </a>
11
- <a href="https://www.npmjs.com/package/purgetss" target="_blank">
12
- <img alt="npm" src="https://img.shields.io/npm/v/purgetss">
13
- </a>
14
- <a href="https://www.npmjs.com/package/purgetss" target="_blank">
15
- <img alt="NPM" src="https://img.shields.io/npm/l/purgetss">
16
- </a>
17
- </p>
18
-
19
- ------
20
-
21
- ## Some key features of PurgeTSS
22
- - Provides more than 10600 [Tailwind-like utility classes](https://tailwindcss.com/) ready to use in your projects.
23
- - Creates a clean `app.tss` file with only the classes used in your project by parsing all your XML files.
24
- - You can customize any of the default classes through a simple configuration file, or you can create new *just-in-time* classes with arbitrary values within the `Views`.
25
- - You can easily use Font Awesome, Material Design and Framework7-Icons fonts in `Buttons` and `Labels`.
26
- - Includes an Animation module to apply a 2D Matrix animation or transformation to any element or to an `Array` of elements.
27
- - Includes a simple two-dimensional Grid System to align and distribute elements in your views.
28
-
29
- ## List of available classes
30
- - [tailwind.tss](https://github.com/macCesar/purgeTSS/blob/master/dist/tailwind.tss)
31
- - [fontawesome.tss](https://github.com/macCesar/purgeTSS/blob/master/dist/fontawesome.tss)
32
- - [framework7icons.tss](https://github.com/macCesar/purgeTSS/blob/master/dist/framework7icons.tss)
33
- - [materialdesignicons.tss](https://github.com/macCesar/purgeTSS/blob/master/dist/materialdesignicons.tss)
34
- - [Your own custom font classes](https://github.com/macCesar/purgeTSS/blob/master/docs/configuring-guide.md)
35
- - [Your own custom styles](https://github.com/macCesar/purgeTSS/blob/master/docs/configuring-guide.md)
36
-
37
- # IMPORTANT NOTICE!!!
38
- ### PurgeTSS will OVERWRITE your existing app.tss file
39
-
40
- > When you run PurgeTSS for the first time, it will backup your `app.tss` file to `_app.tss`.
41
- >
42
- > From now on, add, delete or update your custom classes in `_app.tss.`
43
- >
44
- > Or better yet! Add your custom values in `config.js` to **[configure and customize](https://github.com/macCesar/purgeTSS/blob/master/docs/configuring-guide.md)** PurgeTSS.
45
-
46
- ## Installation
47
- **Install it globally on your machine via [NPM](https://www.npmjs.com/).**
48
- ```bash
49
- > [sudo] npm i -g purgetss
50
- ```
51
-
52
- **You'll need to run `purgetss` only once inside your project to automatically set the necesary files, after that, everytime you compile your app, PurgeTSS will `parse` all your XML files and generate a clean `app.tss` file with only the classes used in your project.**
53
-
54
- ## Example files
55
- **Steps to use the example files:**
56
- - Copy the content of `index.xml` and `app.tss` into a new Alloy project
57
- - Install Fontawesome font files with `purgetss fonts --vendor="fontawesome"`
58
- - Run `purgetss` once to process and purge all your `xml` files
59
- - Compile your app as usual. **We recommend that you use `liveview` to speed up testing and development time.**.
60
-
61
- `index.xml`
62
- ```xml
63
- <Alloy>
64
- <Window class="bg-primary">
65
- <View class="w-10/12 h-auto bg-white rounded-lg">
66
- <View class="m-4 vertical">
67
- <ImageView class="w-16 h-16 mx-auto rounded-16" image="https://randomuser.me/api/portraits/men/43.jpg" />
68
-
69
- <View class="vertical">
70
- <Label class="text-lg font-semibold text-center text-gray-900">John W. Doe</Label>
71
- <Label class="text-sm text-center text-purple-600 mt-0.5">Product Engineer</Label>
72
-
73
- <View class="w-screen mt-6">
74
- <View class="ml-0 horizontal">
75
- <Label class="mr-1 text-xs text-gray-600 far fa-envelope"></Label>
76
- <Label class="text-xs text-gray-600">john@internet.com</Label>
77
- </View>
78
-
79
- <View class="mr-0 horizontal">
80
- <Label class="mr-1 text-xs text-gray-600 fas fa-phone-alt"></Label>
81
- <Label class="text-xs text-gray-600">(555) 765-4321</Label>
82
- </View>
83
- </View>
84
- </View>
85
- </View>
86
- </View>
87
- </Window>
88
- </Alloy>
89
- ```
90
-
91
- `app.tss`
92
- ```css
93
- '.bg-primary': {
94
- backgroundColor: '#002359'
95
- }
96
- ```
97
-
98
- After running `purgetss` you will have a new `app.tss` file with only the classes used in your XML files.
99
-
100
- **Your original `app.tss` file is backed up in `_app.tss`. Use this file if you need to add, delete or update any of your original styles.**
101
-
102
- **Every time PurgeTSS runs, it will copy the content of `_app.tss` to `app.tss`.**
103
-
104
- `app.tss` after purging
105
- ```css
106
- // PurgeTSS
107
- // Created by César Estrada
108
- // https://github.com/macCesar/purgeTSS
109
-
110
- // Styles from _app.tss
111
- '.bg-primary': {
112
- backgroundColor: '#002359'
113
- }
114
-
115
- // Tailwind styles
116
- 'ImageView[platform=ios]': { hires: true }
117
- 'View': { width: Ti.UI.SIZE, height: Ti.UI.SIZE }
118
- 'Window': { backgroundColor: '#ffffff' }
119
- '.bg-white': { backgroundColor: '#ffffff' }
120
- '.rounded-16': { borderRadius: 32 }
121
- '.rounded-lg': { borderRadius: 8 }
122
- '.text-xs': { font: { fontSize: 12 } }
123
- '.text-sm': { font: { fontSize: 14 } }
124
- '.text-lg': { font: { fontSize: 18 } }
125
- '.font-semibold': { font: { fontWeight: 'semibold' } }
126
- '.h-16': { height: 64 }
127
- '.h-auto': { height: Ti.UI.SIZE }
128
- '.vertical': { layout: 'vertical' }
129
- '.horizontal': { layout: 'horizontal' }
130
- '.m-4': { top: 16, right: 16, bottom: 16, left: 16 }
131
- '.mx-auto': { right: null, left: null }
132
- '.mt-6': { top: 24 }
133
- '.mt-0.5': { top: 2 }
134
- '.mr-0': { right: 0 }
135
- '.mr-1': { right: 4 }
136
- '.ml-0': { left: 0 }
137
- '.text-center': { textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER }
138
- '.text-purple-600': { color: '#9333ea' }
139
- '.text-gray-600': { color: '#52525b' }
140
- '.text-gray-900': { color: '#18181b' }
141
- '.w-16': { width: 64 }
142
- '.w-10/12': { width: '83.333334%' }
143
- '.w-screen': { width: Ti.UI.FILL }
144
-
145
- // Default Font Awesome styles
146
- '.fa-envelope': { text: '\uf0e0', title: '\uf0e0' }
147
- '.fa-phone-alt': { text: '\uf879', title: '\uf879' }
148
- '.far': { font: { fontFamily: 'FontAwesome6Free-Regular' } }
149
- '.fas': { font: { fontFamily: 'FontAwesome6Free-Solid' } }
150
- ```
151
-
152
- ## Result
153
- <img src="https://raw.githubusercontent.com/macCesar/purgeTSS/master/assets/images/sample-fixed.png" width="375" alt="iOS Screen - Example">
154
-
155
- ## More examples in the accompanying app
156
- **[Tailwind TSS Sample App](https://github.com/macCesar/tailwind.tss-sample-app)**
157
-
158
- ## Available Commands
159
-
160
- ## init
161
- Creates a `./purgetss/config.js` file at the root of your project.
162
-
163
- ```bash
164
- > purgetss init
165
-
166
- # alias:
167
- > purgetss i
168
- ```
169
-
170
- ```javascript
171
- // ./purgetss/config.js
172
- module.exports = {
173
- 'purge': {
174
- 'mode': 'all',
175
-
176
- // These options are passed through directly to PurgeTSS
177
- 'options': {
178
- 'safelist': [],
179
- }
180
- },
181
- 'theme': {
182
- 'extend': {}
183
- }
184
- };
185
- ```
186
-
187
- `purgetss` will look for this file `./purgetss/config.js` file where you can define any customization.
188
-
189
- Every section of the config file is optional, so you only have to specify whatever you'd like to customize. Any missing sections will fall back to the default configuration.
190
-
191
- You can customize the following properties:
192
-
193
- - Background Colors
194
- - Border Colors
195
- - Border Radius
196
- - Border Width
197
- - Content Width & Height
198
- - Display
199
- - Font Family
200
- - Font Size
201
- - Gradient Color Stops
202
- - Height scale
203
- - Margin
204
- - Opacity
205
- - Padding
206
- - Placeholder Colors
207
- - Shadow Colors
208
- - Text Colors
209
- - Tint Color
210
- - Width scale
211
- - ***Your own classes and ANY Ti Element with ANY number of attributes or conditional statements***
212
-
213
- ## To learn more see [Customization and Configuration Guide](https://github.com/macCesar/purgeTSS/blob/master/docs/configuring-guide.md)
214
-
215
- ## build
216
- When customizing your `config.js` file, you can re-generate `./purgetss/tailwind.tss` file by running:
217
-
218
- ```bash
219
- > purgetss build
220
-
221
- # alias:
222
- > purgetss b
223
- ```
224
-
225
- Every time you run the `purgetss` command, either manually or automatically (see `purgetss watch` below), **PurgeTSS** will check for any change made to `config.js` file and will re-generate `tailwind.tss` if necessary.
226
-
227
- **After generating your new or updated `tailwind.tss` file, PurgeTSS will use it to parse your `xml` files.**
228
-
229
- ## watch
230
- ```bash
231
- > purgetss watch
232
-
233
- # alias:
234
- > purgetss w
235
- ```
236
-
237
- Use this command to autorun `purgetss` every time you compile your project.
238
-
239
- This is very useful in combination with `LiveView` because it will purge all of your files every time you make a change, for example when adding or deleting styles in your Views.
240
-
241
- **You'll get instant feedback of any change you made and speed up your prototyping process significantly.**
242
-
243
- *This only works with regular Alloy projects compiled with `[appc] ti build` command, we haven't test it with any other type of project like webpack or vue.*
244
-
245
- **Use the `--off` option to turn it off.**
246
- ```bash
247
- > purgetss watch --off
248
-
249
- # alias:
250
- > purgetss w -o
251
- ```
252
-
253
- ## module
254
- Use **`purgetss module`** command to install the `purgetss.ui.js` module in your `lib` folder.
255
-
256
- ```bash
257
- > purgetss module
258
-
259
- # alias:
260
- > purgetss m
261
- ```
262
-
263
- **PurgeTSS module contains:**
264
-
265
- - **Animation**: Apply a 2D Matrix animation or transformation to any element or to an array of elements. **Please check out the new `Animation` module [here](https://github.com/macCesar/purgeTSS/blob/master/docs/whats-new/v2.5.0.md#animation-module).**
266
-
267
- ## create (Experimental)
268
- If you want to create a new Alloy Project with `purgetss` ready to go, use the `create` command.
269
-
270
- ```bash
271
- > purgetss create 'Name of the Project' [--vendor="fontawesome, materialdesign, lineicons, boxicons, framework7, tablericons, bootstrapicons"]
272
-
273
- # alias:
274
- > purgetss c 'Name of the Project' [-v=fa,md,f7]
275
- ```
276
-
277
- #### Installing Tailwind CSS
278
- You can also include the `--tailwind` option to install `Tailwind CSS` in your project to work with [Tailwind CSS Intellisense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss) extenstion in VS Code with features such as autocomplete, syntax highlighting, and linting.
279
-
280
- ```bash
281
- > purgetss create 'Name of the Project' [--tailwind]
282
-
283
- # alias:
284
- > purgetss c 'Name of the Project' [-t]
285
- ```
286
-
287
- #### Requirments
288
- You need to have `app.idprefix` and `app.idprefix` already configured in `ti config`.
289
-
290
- ```bash
291
- # A name in reverse domain name format.
292
- app.idprefix = "com.yourdomain"
293
- # Path to use as the workspace directory for new projects.
294
- app.workspace = "/<full-path-to>/<workspace>/<folder>"
295
- # ...
296
- ```
297
-
298
- You can configure them like this:
299
- ```bash
300
- ti config app.idprefix 'com.yourdomain'
301
- ti config app.workspace 'the-full-path/to-the-workspace-folder'
302
- ```
303
-
304
- #### List of Commands used
305
- When you run `purgetss create 'Name of the Project'` it will execute the following commands:
306
-
307
- - **`ti config app.idprefix && ti config app.workspace`** To retreive the related values.
308
- - **`ti create -t app -p all -n "Name of the Project" --no-prompt --id 'the-prefix-id-and-the-name-of-the-project'`** To create an App project with the specified name and its id set automatically.
309
- - **`cd app.workspace/"Name of the Project"`** Change to the newly created folder.
310
- - **`alloy new`** To convert it to an Alloy Project.
311
- - **`purgetss w`** To autorun `purgetss` every time you compile your project.
312
- - **`purgetss b`** To build a new `./purgetss/tailwind.tss` and `./purgetss/config.js` files.
313
- - **`[-v=fa,md,f7]`** Set the `--vendor` argument to copy the selected fonts into your project. Including the CommonJS module into `./app/lib/` folder.
314
- - **`--tailwind`** When using this option, it will execute the following commands
315
- - **`npm init -y && npm i tailwindcss -D && npm i postcss -D && npx tailwindcss init`** to install `Tailwind CSS` and its dependancies.
316
- - **`code .`**, **`subl .`** or **`open .`** It will use either one of these commands to open `VS Code`, `Sublime Text` or the project’s folder in that order.
317
-
318
- ## fonts
319
- ```bash
320
- > purgetss fonts
321
-
322
- # alias:
323
- > purgetss f
324
- ```
325
-
326
- Use this command to copy the free versions of [Font Awesome](https://github.com/FortAwesome/Font-Awesome/tree/master/js-packages/%40fortawesome/fontawesome-free/webfonts), [Material Design Icons](https://github.com/google/material-design-icons) and [Framework7 Icons](https://framework7.io/icons/), Fonts into your `app/assets/fonts` folder. With their names fixed to work in iOS or Android.
327
-
328
- > FontAwesome6Brands-Regular.ttf
329
- >
330
- > FontAwesome6Free-Regular.ttf
331
- >
332
- > FontAwesome6Free-Solid.ttf
333
- >
334
- > MaterialIcons-Regular.ttf
335
- >
336
- > MaterialIconsOutlined-Regular.otf
337
- >
338
- > MaterialIconsRound-Regular.otf
339
- >
340
- > MaterialIconsSharp-Regular.otf
341
- >
342
- > MaterialIconsTwoTone-Regular.otf
343
- >
344
- > Framework7-Icons.ttf
345
-
346
- After copying the desired fonts, you can use them in Buttons and Labels, just set the Font Family like `fa` and the desired icon like `fa-home`.
347
-
348
- **FontAwesome example**:
349
- ```xml
350
- <View class="vertical">
351
- <!-- FontAwesome -->
352
- <Label class="fa fa-home" />
353
- <Button class="fa fa-home" />
354
- </View>
355
- ```
356
-
357
- ```xml
358
- <Alloy>
359
- <Window>
360
- <ScrollView>
361
- <View class="grid">
362
- <View class="grid-cols-2 mx-auto gap-y-2 vertical">
363
- <!-- FontAwesome -->
364
- <Label class="mt-2 text-gray-700" text="FontAwesome" />
365
- <Label class="text-xl text-blue-500 fa fa-home" />
366
- <Button class="w-10 h-10 my-1 text-xl text-white bg-blue-500 rounded fa fa-home" />
367
- </View>
368
-
369
- <View class="grid-cols-2 mx-auto gap-y-2 vertical">
370
- <!-- Material Design -->
371
- <Label class="mt-2 text-gray-700" text="Material Design" />
372
- <Label class="text-xl text-blue-500 md md-home" />
373
- <Button class="w-10 h-10 my-1 text-xl text-white bg-blue-500 rounded md md-home" />
374
- </View>
375
-
376
- <View class="grid-cols-2 mx-auto gap-y-2 vertical">
377
- <!-- Framework7-Icons -->
378
- <Label class="mt-2 text-gray-700" text="Framework7-Icons" />
379
- <Label class="text-xl text-blue-500 f7 f7-house" />
380
- <Button class="w-10 h-10 my-1 text-xl text-white bg-blue-500 rounded f7 f7-house" />
381
- </View>
382
- </View>
383
- </ScrollView>
384
- </Window>
385
- </Alloy>
386
- ```
387
-
388
- ```css
389
- // PurgeTSS
390
- // Created by César Estrada
391
- // https://github.com/macCesar/purgeTSS
392
-
393
- // Main styles
394
- 'View': { width: Ti.UI.SIZE, height: Ti.UI.SIZE }
395
- 'Window': { backgroundColor: '#ffffff' }
396
- '.bg-blue-500': { backgroundColor: '#3b82f6' }
397
- '.rounded': { borderRadius: 4 }
398
- '.text-xl': { font: { fontSize: 20 } }
399
- '.gap-y-2': { top: 8, bottom: 8 }
400
- '.grid': { layout: 'horizontal' }
401
- '.grid-cols-2': { width: '50%' }
402
- '.h-10': { height: 40 }
403
- '.vertical': { layout: 'vertical' }
404
- '.my-1': { top: 4, bottom: 4 }
405
- '.mx-auto': { right: null, left: null }
406
- '.mt-2': { top: 8 }
407
- '.text-white': { color: '#ffffff' }
408
- '.text-gray-700': { color: '#374151' }
409
- '.text-blue-500': { color: '#3b82f6' }
410
- '.w-10': { width: 40 }
411
-
412
- // Default Font Awesome styles
413
- '.fa':{ font: { fontFamily: 'FontAwesome6Free-Solid' } }
414
- '.fa-home': { text: '\uf015', title: '\uf015' }
415
-
416
- // Material Design Icons styles
417
- '.md': { font: { fontFamily: 'MaterialIcons-Regular' } }
418
- '.md-home': { text: '\ue88a', title: '\ue88a' }
419
-
420
- // Framework7 styles
421
- '.f7': { font: { fontFamily: 'Framework7-Icons' } }
422
- '.f7-house': { text: 'house', title: 'house' }
423
- ```
424
-
425
- ## Result
426
- <img src="https://raw.githubusercontent.com/macCesar/purgeTSS/master/assets/images/icon-fonts-bootstrap-grid.png" width="375" alt="iOS Screen - Icon Fonts">
427
-
428
- ### Copying specific font vendors
429
- Use any of the following arguments to copy specific vendors:
430
-
431
- ```bash
432
- > purgetss fonts --vendor="fontawesome, materialdesign, framework7"
433
-
434
- # alias:
435
- > purgetss f -v=fa,md,f7
436
- ```
437
-
438
- Available aliases:
439
- - fa, font, fontawesome = Font Awesome Icons
440
- - md, material, materialdesign = Material Design Icons
441
- - f7, framework, framework7 = Framework7 Icons
442
-
443
- ### Copying corresponding CommonJS Modules
444
- You can use the `--modules` flag to copy the corresponding CommonJS modules into `./app/lib/` folder.
445
-
446
- ```bash
447
- > purgetss fonts --modules
448
- > purgetss fonts --modules --vendor="fontawesome, materialdesign, framework7"
449
-
450
- # alias:
451
- > purgetss f -m
452
- > purgetss f -m -v=fa,md,f7
453
- ```
454
-
455
- Each library contains a CommonJS module exposing the UniCode strings for Font Awesome Icons, Material Design Icons and Framework7-Icons fonts.
456
-
457
- All prefixes are stripped out from their class names and are camelCased, for example:
458
-
459
- - **Font Awesome**: `fa-flag` becomes `flag`
460
- - **Material Design Icons**: `md-flag` becomes `flag`
461
- - **Framework7 Icons** `f7-alarm_fill` becomes `alarmFill` or `f7-clock_fill` becomes `clockFill`.
462
-
463
- ### Custom `fontawesome.tss` file for users with a Font Awesome Pro Account
464
- If you have a **[Font Awesome Pro Account](https://fontawesome.com/pro)** you can generate a custom `./purgetss/fontawesome.tss` file with all the extra classes that the Pro version has. ***(except duotone icons, see note below)***
465
-
466
- After setting the **[@fortawesome scope](https://fontawesome.com/how-to-use/on-the-web/setup/using-package-managers#installing-pro)** with your token, you can install them in your project's root folder with `npm init` and `npm install --save-dev @fortawesome/fontawesome-pro` (current version 6.0.0)
467
-
468
- Now, all you have to do is run `purgetss build` and it will generate a new `purgetss/fontawesome.tss` file and if needed, it will automatically copy the Pro fonts files into `app/assets/fonts`.
469
-
470
- ### Font Awesome 6 Beta
471
- You can even generate a custom `fontawesome.tss` file from **[Font Awesome 6 Beta](https://fontawesome.com/download)**.
472
-
473
- Just move `css` and `webfonts` folders from `fontawesome-pro-6.0.0-beta3-web/`:
474
-
475
- ```bash
476
- fontawesome-pro-6.0.0-beta3-web
477
- └─ css
478
- └─ webfonts
479
- ```
480
-
481
- Into `./purgetss/fontawesome-beta`:
482
-
483
- ```bash
484
- purgetss
485
- └─ fontawesome-beta
486
-    ├─ css
487
-   └─ webfonts
488
- ```
489
-
490
- And as with the Pro Version, just run `purgetss build` to generate your custom `fontawesome.tss` file to beta-test your new icons!
491
-
492
- **Note: Titanium can't use FontAwesome's Duotone icons because they have two separate glyphs for each individual icon.**
493
-
494
- ## update
495
- ```bash
496
- > purgetss update
497
-
498
- # alias:
499
- > purgetss u
500
- ```
501
-
502
- Use this command to update **PurgeTSS** to the latest version.
503
-
504
- We constantly update **PurgeTSS** to add new features, to include the latest versions of Tailwind, Tailwind UI, FontAwesome, etc., and for bug fixes.
505
-
506
- ## sudo-update
507
- If you need to use `sudo` to install NPM modules, please use `purgetss sudo-update`
508
-
509
- ```bash
510
- > purgetss sudo-update
511
-
512
- # alias:
513
- > purgetss su
514
- ```
515
-
516
- ## “IntelliSense for CSS class names in HTML” VSCode extension
517
-
518
- <img src="https://raw.githubusercontent.com/macCesar/purgeTSS/master/assets/images/class-completion-2.gif" alt="Class Completion using IntelliSense for CSS class names in HTML">
519
-
520
- If you're using **[Visual Studio Code](https://code.visualstudio.com)**, we recommend that you install **[IntelliSense for CSS class names in HTML](https://marketplace.visualstudio.com/items?itemName=Zignd.html-css-class-completion)** extension.
521
-
522
- It provides class name completion for the `XML` class attribute based on the new `definitions.css` file.
523
-
524
- After installing the extension, add the following lines to your `.vscode/settings.json` file:
525
-
526
- Mainly, you'll need to add the `xml` language to the `"HTMLLanguages"` setting and exclude any `css/html` files from the caching process by pointing `"excludeGlobPattern"` to the `./purgetss/fonts/` folder.
527
-
528
- VS Code `settings.json`:
529
-
530
- ```json
531
-
532
- {
533
- "html-css-class-completion.HTMLLanguages": [
534
- "html",
535
- "vue",
536
- "razor",
537
- "blade",
538
- "handlebars",
539
- "twig",
540
- "django-html",
541
- "php",
542
- "markdown",
543
- "erb",
544
- "ejs",
545
- "svelte",
546
- "xml",
547
- ],
548
- "html-css-class-completion.excludeGlobPattern": "**/node_modules/**,purgetss/fonts/**/*.{css,html}",
549
- }
550
- ```
551
-
552
- ## Contributing
553
- If you have any suggestions or improvements, please make a PR.
5
+ <div align="center">
6
+
7
+ ![npm](https://img.shields.io/npm/dm/purgetss)
8
+ ![npm](https://img.shields.io/npm/v/purgetss)
9
+ ![NPM](https://img.shields.io/npm/l/purgetss)
10
+
11
+ </div>
12
+
13
+ **PurgeTSS** is a package with tailwind-like utility classes for **[Titanium developers](https://tidev.io/)** who want to easily and quickly create beautifully designed mobile apps.
14
+
15
+ ---
16
+
17
+ # Key features of PurgeTSS
18
+
19
+ - Provides almost 11,000 **[Tailwind-like utility classes](https://tailwindcss.com/)** ready to use in your projects.
20
+ - It creates a clean **`app.tss`** file with only the classes used in your project by parsing all your XML files.
21
+ - You can customize any of the default classes through a simple configuration file, or you can create _just-in-time_ classes with **arbitrary values** within the `Views`.
22
+ - You can easily use **Font Awesome**, **Material Design** and **Framework7-Icons** fonts in `Buttons` and `Labels`.
23
+ - You can create a **`fonts.tss`** file with all the class definitions and fontFamily selectors from any Icon, Serif, Sans-Serif, Cursive, Fantasy or Monospace font families.
24
+ - Includes an **Animation module** to apply basic 2D Matrix animations or transformations to any element or to an `Array` of elements.
25
+ - Includes a simple two-dimensional **Grid System** to align and distribute elements in your views.
26
+
27
+ ### Visit the official documentation site at [purgetss.com](https://purgetss.com) to learn more about PurgeTSS
28
+
29
+ ## Table of Content
30
+
31
+ - [Installation](https://purgetss.com/docs/installation)
32
+ - [Commands](https://purgetss.com/docs/commands)
33
+ - Customization
34
+ - [config file](https://purgetss.com/docs/customization/the-config-file)
35
+ - [Custom rules](https://purgetss.com/docs/customization/custom-rules)
36
+ - [apply directive](https://purgetss.com/docs/customization/the-apply-directive)
37
+ - [opacity modifier](https://purgetss.com/docs/customization/the-opacity-modifier)
38
+ - [Arbitrary values in XMLs](https://purgetss.com/docs/customization/arbitrary-values)
39
+ - [Platform and Device modifiers](https://purgetss.com/docs/customization/platform-and-device-modifiers)
40
+ - [Missing Icon libraries](https://purgetss.com/docs/customization/missing-icon-libraries)
41
+ - Animation module
42
+ - [Introduction](https://purgetss.com/docs/animation-module/introduction)
43
+ - [Available utilities](https://purgetss.com/docs/animation-module/available-utilities)
44
+ - [Complex UI elements](https://purgetss.com/docs/animation-module/complex-ui-elements)
45
+ - [Grid System](https://purgetss.com/docs/grid-system)
package/bin/purgetss CHANGED
@@ -16,7 +16,7 @@ if (notifier.update && notifier.update.latest !== pkg.version) {
16
16
  program
17
17
  .version(package.version)
18
18
  .description(package.description + '\n\nPlease visit ' + chalk.yellow('https://github.com/macCesar/purgeTSS') + ' for details.')
19
- .help('PurgeTSS will create a clean app.tss file by copying only the classes used in your XML Files.\n\nIt works with tailwind.tss, fontawesome.tss, materialdesignicons.tss, framework7icons.tss.\n\nALL your classes from your original app.tss file will be copied over without purging.\n\nYou can create your own custom classes and values by running `purgetss init` and `purgetss build`.')
19
+ .help('PurgeTSS will create a clean app.tss file with only the classes used in your XML Files.\n\nIt works with tailwind.tss, fontawesome.tss, materialdesignicons.tss, framework7icons.tss.\n\nYour original classes will be backed up in _app.tss.\n\nYou can create your own custom classes and values by running `purgetss init` and `purgetss build`.')
20
20
  .option('-d, --debug', 'Show time taken to execute each process.')
21
21
  .option('-a, --all', 'Run all processes. purgetss build-fonts, purgetss build and purgetss')
22
22
  .action((args, options, logger) => {
@@ -53,6 +53,16 @@ program
53
53
  purgetss.buildCustom();
54
54
  });
55
55
 
56
+ program
57
+ .command('auto-build')
58
+ .description('Build a custom `tailwind.tss` file.')
59
+ .help('It will generate a new custom `tailwind.tss` file based on the attributes defined in `./purgetss/config.js`.\n\nIt will also generate a custom `fontawesome.tss` file if you installed the proper dependencies, like FontAwesome Beta or FontAwesome Pro.')
60
+ .action((args, options, logger) => {
61
+ let completions = require('../testing-scripts/completions');
62
+ // completions;
63
+ // completions.motherGooseClassGeneration();
64
+ });
65
+
56
66
  program
57
67
  .command('watch')
58
68
  .alias('w')
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Font Awesome Free 6.1.0 by @fontawesome - https://fontawesome.com
2
+ * Font Awesome Free 6.1.1 by @fontawesome - https://fontawesome.com
3
3
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4
4
  */
5
5
 
@@ -416,6 +416,8 @@ const icons = {
416
416
  'chevronRight': '\uf054',
417
417
  'chevronUp': '\uf077',
418
418
  'child': '\uf1ae',
419
+ 'childDress': '\ue59c',
420
+ 'childReaching': '\ue59d',
419
421
  'childRifle': '\ue4e0',
420
422
  'children': '\ue4e1',
421
423
  'church': '\uf51d',
@@ -1,4 +1,4 @@
1
- // Font Awesome Free 6.1.0 by @fontawesome - https://fontawesome.com
1
+ // Font Awesome Free 6.1.1 by @fontawesome - https://fontawesome.com
2
2
  // License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
3
3
 
4
4
  // Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons
@@ -424,6 +424,8 @@
424
424
  '.fa-chevron-right': { text: '\uf054', title: '\uf054' }
425
425
  '.fa-chevron-up': { text: '\uf077', title: '\uf077' }
426
426
  '.fa-child': { text: '\uf1ae', title: '\uf1ae' }
427
+ '.fa-child-dress': { text: '\ue59c', title: '\ue59c' }
428
+ '.fa-child-reaching': { text: '\ue59d', title: '\ue59d' }
427
429
  '.fa-child-rifle': { text: '\ue4e0', title: '\ue4e0' }
428
430
  '.fa-children': { text: '\ue4e1', title: '\ue4e1' }
429
431
  '.fa-church': { text: '\uf51d', title: '\uf51d' }