https://github.com/dmotz/monocat
Automated asset inlining
https://github.com/dmotz/monocat
cli coffeescript javascript node performance static
Last synced: 10 months ago
JSON representation
Automated asset inlining
- Host: GitHub
- URL: https://github.com/dmotz/monocat
- Owner: dmotz
- License: mit
- Created: 2012-06-11T04:55:40.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2019-11-01T20:22:56.000Z (over 6 years ago)
- Last Synced: 2025-08-12T14:12:58.823Z (11 months ago)
- Topics: cli, coffeescript, javascript, node, performance, static
- Language: CoffeeScript
- Homepage:
- Size: 13.7 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Monocat
#### Automated asset inlining
Monocat is ideal for deploying small, static, single-page sites where you want to minimize the number of http requests. Monocat compresses and writes the contents of external assets into the html source for an easy speed optimization.
### Installation:
You'll need [Node.js](http://nodejs.org) installed. Then:
```
$ npm install -g monocat
```
### Usage:
Monocat works sort of like a jQuery plugin, but from the commandline.
Just add the class `monocat` to any `` or `<link>` (stylesheets only) tag you want to inline:
```html
<link rel="stylesheet" href="css/main.css" class="monocat">
<script src="js/huge-lib.js">
```
Notice that the second tag will be ignored since it lacks the `monocat` class.
To create an optimized version of your html file, run this:
```
$ monocat index.html
```
By default, this will create a ready-to-deploy file called `index_monocat.html` in the same directory.
Pass an optional output filename as the second argument:
```
$ monocat src/index.html build/index.html
```