You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| 1.1.0-PL | September 09, 2012 |[Vasiliy Naumkin](http://bezumkin.ru)| Improved minifiers and code refactor |
18
+
The MinifyX project was started in 2021 by [Patrick Nijkamp](https://github.com/b03tz). It was developed further by [Vasily Naumkin](https://github.com/bezumkin) and [Sergey Shlokov](https://github.com/sergant210). It is maintained and developed further since 2021 by [Thomas Jakobi](https://github.com/jako)
23
19
24
20
## Download & Installation
25
21
26
-
Install the package through the MODX® package manager.
27
-
28
-
## What you need to know
29
-
30
-
MinifyX combines your files to 1 cache file and loads it from there. If you combine CSS files you should use absolute paths when using images or other URL related calls, the same goes for javascript. Some frameworks use bootloaders (like EXT) that need to be in their respective directories before they work. Be sure not to fall for this trap, could save you some time ;)
31
-
32
-
## Using MinifyX in the front-end
33
-
34
-
## Placing the snippet
35
-
36
-
Place the main `[[[MinifyX](extras/minifyx "MinifyX")]]` snippet call on your webpage. If you have placed the snippet it assigns the following placeholders to your page:
|`[[+MinifyX.css]]`| The tag containing the source to the CSS cache file (should be placed in the head, most of the time before the javascript includes) |
41
-
|`[[+MinifyX.javascript]]`| The tag containing the source to the javascript cache file (should be placed in the head) |
42
-
43
-
## Configuration parameters
44
-
45
-
You can configure the snippet "MinifyX" with the following parameters:
| jsSources | Comma separated list to your JS files from the site base URL | Comma separated string | (empty) | no |
50
-
| cssSources | Comma separated list to your CSS files from the site base URL | Comma separated string | (empty) | no |
51
-
| minifyCss | Whether to minify the CSS or not | 0 = no, 1 = yes | 0 | no |
52
-
| minifyJs | Whether to minify the JS or not |
53
-
| (only block comments allowed! **experimental**) | 0 = no, 1 = yes | 0 | no |
54
-
| cacheFolder | The folder to the cache files from the site base URL | A string | assets/components/minifyx/cache/ | no |
55
-
| jsFilename | Base name of destination js file, without extension | A string | scripts ||
56
-
| cssFilename | Base name of destination css file, without extension | A string | styles ||
57
-
58
-
## Examples
59
-
60
-
Below you see the main snippet call and the placement of the placeholders. Every parameter is optional, we have just used some possibilities of customization.
61
-
62
-
```php
63
-
<html>
64
-
<head>
65
-
[[MinifyX?
66
-
&jsSources=`
67
-
/assets/myframework.js,
68
-
/assets/lightbox.js,
69
-
/assets/script.js
70
-
`
71
-
&cssSources=`
72
-
/assets/style1.css,
73
-
/assets/style2.css
74
-
`
75
-
]]
76
-
77
-
[[+MinifyX.javascript]]
78
-
[[+MinifyX.css]]
79
-
</head>
80
-
<body></body>
81
-
</html>
82
-
```
22
+
MinifyX can be installed from within the MODX Revolution manager via Package Management, or from the MODX Extras Repository, available on [https://modx.com/extras/package/imageplustvinput](https://extras.modx.com/package/minifyx)
0 commit comments