0.1.27 • Published 3 years ago

webmangler v0.1.27

Weekly downloads
138
License
MIT
Repository
github
Last release
3 years ago

WebMangler Core

NPM Package

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-dev

And 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

0.1.27

3 years ago

0.1.26

3 years ago

0.1.25

3 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

4 years ago

0.1.18

4 years ago

0.1.17

4 years ago

0.1.16

4 years ago

0.1.15

4 years ago

0.1.14

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.8

4 years ago

0.1.9

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago