purgetss 3.1.3 → 3.2.0
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 +25 -11
- package/assets/fonts/FontAwesome6Brands-Regular.ttf +0 -0
- package/assets/fonts/FontAwesome6Free-Regular.ttf +0 -0
- package/assets/fonts/FontAwesome6Free-Solid.ttf +0 -0
- package/assets/images/mapicon-font.png +0 -0
- package/assets/images/microns-font.png +0 -0
- package/bin/purgetss +11 -1
- package/dist/fontawesome.js +1439 -759
- package/dist/fontawesome.tss +1451 -767
- package/dist/purgetss.ui.js +6 -5
- package/dist/tailwind.tss +816 -691
- package/docs/configuring-guide.md +5 -8
- package/docs/whats-new/v2.5.0.md +2 -2
- package/docs/whats-new/v3.1.5.md +266 -0
- package/docs/whats-new/v3.1.7.md +17 -0
- package/docs/whats-new/v3.2.0.md +161 -0
- package/index.js +379 -42
- package/lib/build-fontawesome-free-js.js +2 -2
- package/lib/build-fontawesome-free-tss.js +2 -2
- package/lib/build-fonts-folder.js +3 -3
- package/lib/build-tailwind.js +6 -2
- package/lib/helpers.js +148 -46
- package/lib/templates/custom-icon-fonts/reset.tss +2 -0
- package/lib/templates/custom-icon-fonts/template.js +3 -0
- package/lib/templates/custom-icon-fonts/template.tss +1 -0
- package/lib/templates/fontawesome/beta-reset.tss +6 -0
- package/lib/templates/fontawesome/free-reset.tss +12 -8
- package/lib/templates/fontawesome/free-template.js +1 -1
- package/lib/templates/fontawesome/free-template.tss +1 -1
- package/lib/templates/fontawesome/pro-reset.tss +19 -11
- package/lib/templates/fontawesome/pro-template.js +1 -1
- package/lib/templates/fontawesome/pro-template.tss +1 -1
- package/lib/templates/tailwind/template.tss +1 -1
- package/package.json +4 -5
- package/assets/fonts/FontAwesome5Brands-Regular.ttf +0 -0
- package/assets/fonts/FontAwesome5Free-Regular.ttf +0 -0
- package/assets/fonts/FontAwesome5Free-Solid.ttf +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="
|
|
2
|
+
<img src="https://codigomovil.mx/images/logotipo-purgetss-gris.svg" height="230" width="230" alt="PurgeCSS logo"/>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
**PurgeTSS** is a package for all [Titanium SDK developers](https://tidev.io/), who want to easily and quickly create beautifully designed mobile apps.
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
> 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.
|
|
48
48
|
|
|
49
49
|
## Installation
|
|
50
|
-
**Install it globally on your machine via [NPM](
|
|
50
|
+
**Install it globally on your machine via [NPM](https://www.npmjs.com/).**
|
|
51
51
|
```bash
|
|
52
52
|
> [sudo] npm i -g purgetss
|
|
53
53
|
```
|
|
@@ -148,8 +148,8 @@ After running `purgetss` you will have a new `app.tss` file with only the classe
|
|
|
148
148
|
// Default Font Awesome styles
|
|
149
149
|
'.fa-envelope': { text: '\uf0e0', title: '\uf0e0' }
|
|
150
150
|
'.fa-phone-alt': { text: '\uf879', title: '\uf879' }
|
|
151
|
-
'.far': { font: { fontFamily: '
|
|
152
|
-
'.fas': { font: { fontFamily: '
|
|
151
|
+
'.far': { font: { fontFamily: 'FontAwesome6Free-Regular' } }
|
|
152
|
+
'.fas': { font: { fontFamily: 'FontAwesome6Free-Solid' } }
|
|
153
153
|
```
|
|
154
154
|
|
|
155
155
|
## Result
|
|
@@ -277,6 +277,17 @@ If you want to create a new Alloy Project with `purgetss` ready to go, use the `
|
|
|
277
277
|
> purgetss c 'Name of the Project' [-v=fa,md,li,bx,f7,ti,bi]
|
|
278
278
|
```
|
|
279
279
|
|
|
280
|
+
#### Installing Tailwind CSS
|
|
281
|
+
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.
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
> purgetss create 'Name of the Project' [--tailwind]
|
|
285
|
+
|
|
286
|
+
# alias:
|
|
287
|
+
> purgetss c 'Name of the Project' [-t]
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
#### Requirments
|
|
280
291
|
You need to have `app.idprefix` and `app.idprefix` already configured in `ti config`.
|
|
281
292
|
|
|
282
293
|
```bash
|
|
@@ -293,6 +304,7 @@ ti config app.idprefix 'com.yourdomain'
|
|
|
293
304
|
ti config app.workspace 'the-full-path/to-the-workspace-folder'
|
|
294
305
|
```
|
|
295
306
|
|
|
307
|
+
#### List of Commands used
|
|
296
308
|
When you run `purgetss create 'Name of the Project'` it will execute the following commands:
|
|
297
309
|
|
|
298
310
|
- **`ti config app.idprefix && ti config app.workspace`** To retreive the related values.
|
|
@@ -302,6 +314,8 @@ When you run `purgetss create 'Name of the Project'` it will execute the followi
|
|
|
302
314
|
- **`purgetss w`** To autorun `purgetss` every time you compile your project.
|
|
303
315
|
- **`purgetss b`** To build a new `./purgetss/tailwind.tss` and `./purgetss/config.js` files.
|
|
304
316
|
- **`[-v=fa,md,li,bx,f7,ti,bi]`** Set the `--vendor` argument to copy the selected fonts into your project. Including the CommonJS module into `./app/lib/` folder.
|
|
317
|
+
- **`--tailwind`** When using this option, it will execute the following commands
|
|
318
|
+
- **`npm init -y && npm i tailwindcss -D && npm i postcss -D && npx tailwindcss init`** to install `Tailwind CSS` and its dependancies.
|
|
305
319
|
- **`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.
|
|
306
320
|
|
|
307
321
|
## fonts
|
|
@@ -318,11 +332,11 @@ Use this command to copy the free versions of [Boxicons](https://boxicons.com),
|
|
|
318
332
|
>
|
|
319
333
|
> boxicons.ttf
|
|
320
334
|
>
|
|
321
|
-
>
|
|
335
|
+
> FontAwesome6Brands-Regular.ttf
|
|
322
336
|
>
|
|
323
|
-
>
|
|
337
|
+
> FontAwesome6Free-Regular.ttf
|
|
324
338
|
>
|
|
325
|
-
>
|
|
339
|
+
> FontAwesome6Free-Solid.ttf
|
|
326
340
|
>
|
|
327
341
|
> Framework7-Icons.ttf
|
|
328
342
|
>
|
|
@@ -435,7 +449,7 @@ After copying the desired fonts, you can use them in Buttons and Labels, just se
|
|
|
435
449
|
'.w-10': { width: 40 }
|
|
436
450
|
|
|
437
451
|
// Default Font Awesome styles
|
|
438
|
-
'.fa':{ font: { fontFamily: '
|
|
452
|
+
'.fa':{ font: { fontFamily: 'FontAwesome6Free-Solid' } }
|
|
439
453
|
'.fa-home': { text: '\uf015', title: '\uf015' }
|
|
440
454
|
|
|
441
455
|
// Material Design Icons styles
|
|
@@ -516,17 +530,17 @@ All prefixes are stripped out from their class names and are camelCased, for exa
|
|
|
516
530
|
### Custom `fontawesome.tss` file for users with a Font Awesome Pro Account
|
|
517
531
|
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)***
|
|
518
532
|
|
|
519
|
-
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
|
|
533
|
+
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)
|
|
520
534
|
|
|
521
535
|
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`.
|
|
522
536
|
|
|
523
537
|
### Font Awesome 6 Beta
|
|
524
538
|
You can even generate a custom `fontawesome.tss` file from **[Font Awesome 6 Beta](https://fontawesome.com/download)**.
|
|
525
539
|
|
|
526
|
-
Just move `css` and `webfonts` folders from `fontawesome-pro-6.0.0-
|
|
540
|
+
Just move `css` and `webfonts` folders from `fontawesome-pro-6.0.0-beta3-web/`:
|
|
527
541
|
|
|
528
542
|
```bash
|
|
529
|
-
fontawesome-pro-6.0.0-
|
|
543
|
+
fontawesome-pro-6.0.0-beta3-web
|
|
530
544
|
└─ css
|
|
531
545
|
└─ webfonts
|
|
532
546
|
```
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/purgetss
CHANGED
|
@@ -35,7 +35,7 @@ program
|
|
|
35
35
|
.alias('c')
|
|
36
36
|
.description('Creates a new Alloy Project with `purgetss` already configured.')
|
|
37
37
|
.help('Creates a new Alloy Project with `purgetss` already configured.')
|
|
38
|
-
.option('-t, --tailwind', 'To install Tailwind CSS in your project to work with `Tailwind CSS Intellisense
|
|
38
|
+
.option('-t, --tailwind', 'To install Tailwind CSS in your project to work with `Tailwind CSS Intellisense` extenstion in VS Code.')
|
|
39
39
|
.option('-v, --vendor <arguments>', 'Use any of the following arguments to copy specific vendors:\n fa = Font Awesome Icons\n md = Material Design Icons\n li = LineIcons\n bx = Boxicons\n f7 = Framework7 Icons\n ti = Tabler Icons\n bi = Bootstrap Icons')
|
|
40
40
|
.argument('<name>', 'The name of the project')
|
|
41
41
|
.action((args, options, logger) => {
|
|
@@ -72,6 +72,16 @@ program
|
|
|
72
72
|
purgetss.copyFonts(options);
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
+
program
|
|
76
|
+
.command('build-fonts')
|
|
77
|
+
.alias('bf')
|
|
78
|
+
.description('Build a custom `fonts.tss` file.')
|
|
79
|
+
.help('It will generate a new custom `fonts.tss` file based on the font and css files to the `./purgetss/fonts` folder.')
|
|
80
|
+
.option('-m, --modules', 'Use the `--modules` option to also generate a CommonJS module into `./app/lib/` folder called `purgetss-fonts.js`.')
|
|
81
|
+
.action((args, options, logger) => {
|
|
82
|
+
purgetss.buildCustomFonts(options);
|
|
83
|
+
});
|
|
84
|
+
|
|
75
85
|
program
|
|
76
86
|
.command('module')
|
|
77
87
|
.alias('m')
|