New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

combohtml

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

combohtml

Combo your HTML files, make scripts(.js) and stylesheets(.css) inline.

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

ComboHTML

Version

Combo your HTML files, make scripts(.js) and stylesheets(.css) inline.

Quick start

There are 3 directives: inline, compress, remove, and support all HTML tags.

  • if the tag is <link>, <style>, or <script>, it's accepted all 3 directives,
  • otherwise it's accepted compress and remove
<!-- inline remote file only -->
<link data-combohtml="inline" rel="stylesheet" href="//example.com/index.css">

<!-- inline and compress local file -->
<script data-combohtml="inline,compress" src="./index.js"></script>

<!-- compress inline code -->
<style data-combohtml="compress">
  div {
    color: #000;
  }
</style>
<script data-combohtml="compress">
  function test (whatever) {
    var one = 1
    return one + whatever
  }
</script>

<!-- remove test/mock tag -->
<script data-combohtml="remove">
  mock = "the mock data in development environment"
</script>

<!-- compress html, maybe you'd like to add the directive to `<html>` or `<body>` tag -->
<div data-combohtml="compress">
  whatever...
</div>

Install

First, make sure your Node.js >= 4.

npm install combohtml

Command line usage

# process specified file
combohtml -i index.html -o dist.html

# process mutiple files
combohtml --input 'src/**/*.html' --output dist

Command line options

-i, --input <input>    Input file(s)
-o, --output <output>  Output directory or file name
-r, --root [root]      Files root path,
                       default to current working directory (process.cwd())
-a, --attr [attr]      Specified attribute,
                       default to "data-combohtml"

Keywords

combo

FAQs

Package last updated on 06 Jul 2018

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