minify-selectors
Advanced tools
Comparing version 0.4.3 to 0.7.8
{ | ||
"name": "minify-selectors", | ||
"version": "0.4.3", | ||
"version": "0.7.8", | ||
"description": "Post-processor that minifies classes and IDs in CSS, HTML and Javascript files.", | ||
@@ -14,4 +14,2 @@ "author": { | ||
"scripts": { | ||
"build": "", | ||
"check": "./build/run.js", | ||
"postinstall": "node ./build/install.js", | ||
@@ -25,3 +23,3 @@ "test": "echo \"Error: no test specified\" && exit 1" | ||
"files": [ | ||
"build/**/*" | ||
"build/*.js" | ||
], | ||
@@ -28,0 +26,0 @@ "keywords": [ |
@@ -19,6 +19,6 @@ # minify-selectors | ||
```css | ||
#AA { … } | ||
.AB, .AC { … } | ||
.AB .AD:focus-within { … } | ||
.AE a.AD { … } | ||
#a { … } | ||
.b, .c { … } | ||
.b .d:focus-within { … } | ||
.e a.d { … } | ||
``` | ||
@@ -40,7 +40,7 @@ | ||
```html | ||
<main id="AA"> | ||
<nav class="AC"> | ||
<div class="AD B2"> | ||
<label for="Ay" class="D3 D4">…</label> | ||
<input type="text" id="Ay" class="C9 CH Di"> | ||
<main id="a"> | ||
<nav class="c"> | ||
<div class="d a1"> | ||
<label for="y" class="F j">…</label> | ||
<input type="text" id="y" class="A9 t Av"> | ||
</div> | ||
@@ -61,7 +61,7 @@ </nav> | ||
for (let link of document.querySelectorAll('a.Bd')) { | ||
link.classList.remove('AD'); | ||
link.classList.remove('d'); | ||
} | ||
``` | ||
For a full outline of capabilities and current limitations, see TODO | ||
For a full outline of capabilities and current limitations, see [parse_selectors info](crates/parse_selectors/info.md) | ||
@@ -75,3 +75,3 @@ ## Usage | ||
Running in the command line | ||
Run within npm scripts or in command line | ||
```shell | ||
@@ -81,4 +81,11 @@ minify-selectors --input "example/dir/src" --output "example/dir/dist" | ||
For more CLI options, see the 'Options' section below. | ||
minify-selectors only supports regular CSS, HTML and JS files. minify-selectors should be one of the final steps in your build process — SASS/SCSS, LESS, Typescript, JQuery, Handlebars, etc. should be processed first. | ||
## Options | ||
### CLI flags | ||
| Flag | Description | | ||
|-------|--------------| | ||
| `--input` (or `-i`) | Directory or file to process. If a directory path is provided — any CSS, HTML and JS files in the given directory and sub-directories will be parsed. If only a filepath is provided — only the given file will be parsed. | | ||
| `--output` (or `-o`) | Directory to ouput processed files to. Setting the output path to be the same as the input path will overwrite existing files. | |
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
87
0
5035
5