0.1.27 • Published 3 years ago
webmangler v0.1.27
WebMangler Core
The WebMangler Core is the central package of the WebMangler ecosystem. It can be used by itself programmatically or through other packages and plugins.
Usage
Install the webmangler core, e.g.:
npm install webmangler --save-devAnd use it programmatically, e.g.:
import webmangler from "webmangler";
import { BuiltInLanguagesSupport } from "webmangler/languages";
import { RecommendedManglers } from "webmangler/manglers";
// Read in the files you want to mangle ...
const originalFiles = [
{ type: "css", content: "..." },
{ type: "html", content: "..." },
{ type: "js", content: "..." },
];
// and run WebMangler.
const { files } = webmangler(originalFiles, {
plugins: [new RecommendedManglers()],
languages: [new BuiltInLanguagesSupport()],
});
console.log(files[0]);
// Outputs: { type: "css", content: "..." }Which will mangle CSS classes, CSS variables, and HTML data attributes in CSS, HTML, and JavaScript.
Other ways to use WebMangler
- as a CLI - WebMangler CLI
0.1.27
3 years ago
0.1.26
3 years ago
0.1.25
4 years ago
0.1.24
4 years ago
0.1.23
4 years ago
0.1.22
4 years ago
0.1.21
4 years ago
0.1.20
4 years ago
0.1.19
5 years ago
0.1.18
5 years ago
0.1.17
5 years ago
0.1.16
5 years ago
0.1.15
5 years ago
0.1.14
5 years ago
0.1.13
5 years ago
0.1.12
5 years ago
0.1.11
5 years ago
0.1.10
5 years ago
0.1.8
5 years ago
0.1.9
5 years ago
0.1.7
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.4
5 years ago
0.1.3
5 years ago
0.1.2
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago