minify-selectors
Advanced tools
Comparing version 1.6.2 to 1.7.2
const { Binary } = require('binary-install'); | ||
const os = require('os'); | ||
const cTable = require('console.table'); | ||
const package = require('../package.json'); | ||
@@ -56,12 +55,15 @@ | ||
const type = os.type(); | ||
let platforms = ''; | ||
for(let platform of SUPPORTED_PLATFORMS) { | ||
if ( | ||
arch === platform.architecture | ||
&& type === platform.type | ||
) return platform; | ||
for (let platform of SUPPORTED_PLATFORMS) { | ||
platforms += `\n - ${ platform.type } ${ platform.architecture }`; | ||
if (arch === platform.architecture && type === platform.type) | ||
return platform; | ||
} | ||
error( | ||
`Unsupported platform: ${ type } ${ arch }.\nCurrently supported platforms are:\n\n${ cTable.getTable(SUPPORTED_PLATFORMS) }\n\nPlease feel free to notify us by creating an issue here: ${ package.bugs.url }.` | ||
`Unsupported platform: ${ type } ${ arch }.` | ||
+ `\nCurrently supported platforms are:` | ||
+ `${ platforms }` | ||
+ `\nPlease feel free to notify us by creating an issue here: ${ package.bugs.url }.` | ||
); | ||
@@ -68,0 +70,0 @@ }; |
{ | ||
"name": "minify-selectors", | ||
"version": "1.6.2", | ||
"version": "1.7.2", | ||
"description": "Post-processor that minifies classes and IDs in CSS, HTML, Javascript and SVG files.", | ||
@@ -42,5 +42,4 @@ "author": { | ||
"dependencies": { | ||
"binary-install": "^1.0.1", | ||
"console.table": "^0.10.0" | ||
"binary-install": "^1.0.1" | ||
} | ||
} |
@@ -14,3 +14,3 @@ [1]: https://github.com/adamgian/minify-selectors/releases/latest | ||
Post-processor that minifies classes and IDs selector names in CSS, HTML, Javascript and SVG files. Each unique selector — and any subsequent occurances elsewhere — is converted into an ultracompact one. | ||
Post-processor that minifies classes and IDs selector names in CSS, HTML, Javascript and SVG files. | ||
@@ -26,9 +26,5 @@ Enhance your front-end assets and build optimisations pipeline — wring even more out from your already minified and optimised payload sizes. Additionally can offer a certain degree of obfuscation to your code. | ||
For a full outline of capabilities and current limitations, see [parse_selectors/info.md](crates/parse_selectors/info.md). | ||
minify-selectors aims to offer comprehensive out of the box support — minifying all obvious selectors right out of the gate with minimal set up. | ||
### Comprehensive out of the box support | ||
minify-selectors aims to minify all obvious selectors right out of the gate. Any extra work configuring should be to assist minify-selectors to identify additional or ambigious selectors. | ||
#### CSS and embedded styles | ||
@@ -121,2 +117,35 @@ | ||
</table> | ||
<table> | ||
<tr> | ||
<td> | ||
<p><sub>Input</sub></p> | ||
<pre lang="html"> | ||
<svg xmlns="http://www.w3.org/2000/svg"> | ||
<style> | ||
.icon-background { … } | ||
</style> | ||
<g class="icon"> | ||
<circle class="icon-background" fill="url(#dotted)" | ||
/> | ||
</g> | ||
</svg> | ||
<!-- | ||
--></pre> | ||
</td> | ||
<td valign="top"> | ||
<p><sub>Output:</sub></p> | ||
<pre lang="html"> | ||
<svg xmlns="http://www.w3.org/2000/svg"> | ||
<style> | ||
.dz { … } | ||
</style> | ||
<g class="d8"> | ||
<circle class="dz" fill="url(#Y)" /> | ||
</g> | ||
</svg> | ||
<!-- | ||
--></pre> | ||
</td> | ||
</tr> | ||
</table> | ||
@@ -123,0 +152,0 @@ |
21739
1
84
319
- Removedconsole.table@^0.10.0
- Removedclone@1.0.4(transitive)
- Removedconsole.table@0.10.0(transitive)
- Removeddefaults@1.0.4(transitive)
- Removedeasy-table@1.1.0(transitive)
- Removedwcwidth@1.0.1(transitive)