com

combinator

Change blocks of <script> & <link> elements into a single element using a combo system

Showing:

Popularity

Downloads/wk

0

GitHub Stars

0

Maintenance

Last Commit

4yrs ago

Contributors

3

Package

Dependencies

9

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

node-combinator

Build Status NPM version Dependency Status devDependency Status

⚠️ ⚡ ⚠️ This project is UNMAINTAINED ⚠️ ⚡ ⚠️

Console script to find repeated <script> or <link> elements and streamline them into a single element using a combo handler

Takes HTML that looks like this

<!DOCTYPE html>
<head>
    ...
    <link rel="stylesheet" type="text/css" href="/fooga.css">
    <link rel="stylesheet" type="text/css" href="/wooga/booga.css">
    <link rel="stylesheet" type="text/css" href="/tooga/looga.css">
</head>
<body>
    ...
    <script type="text/javascript" src="/pooga/rooga.js"></script>
    <script type="text/javascript" src="/dooga.js"></script>
</body>

and transforms it to look like this

<!DOCTYPE html>
<head>
    ...
    <link rel="stylesheet" type="text/css" href="/combo?/fooga.css&/wooga/booga.css&/tooga/looga.css">
</head>
<body>
    ...
    <script type="text/javascript" src="/combo?/pooga/rooga.js&/dooga.js"></script>
</body>

saving HTTP requests, bytes over the wire, and possibly your sanity (unlikely).

Install

npm -g install node-combinator

Usage

combinator -f index.html

Programmatic Usage

var Combinator = require("combinator"),
    combinator = new Combinator({
        src : "<!DOCTYPE html>"
    });
    
combinator.run(function(error, html) {
    // html is optimized output
});

Development

To install from a clone of the source:

git clone git://github.com/tivac/node-combinator.git
cd node-combinator
npm link

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial