New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

monocat

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monocat

Write scripts and styles inline into html for optimized deployment

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

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 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 <script> or <link> (stylesheets only) tag you want to inline:

<link rel="stylesheet" href="css/main.css" class="monocat">
<script src="js/huge-lib.js"></script>
<script src="js/main.js" class="monocat"></script>

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

Keywords

FAQs

Package last updated on 14 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc