vamtiger-bundle-html

Bundle HTML

Usage no npm install needed!

<script type="module">
  import vamtigerBundleHtml from 'https://cdn.skypack.dev/vamtiger-bundle-html';
</script>

README

VAMTIGER Bundle HTML

VAMTIGER Bundle HTML bundles HTML into a single compiled output file.

Installation

VAMTIGER Bundle HTML can be installed using npm or yarn:

npm i --global vamtiger-bundle-html 

or

yarn global vamtiger-bundle-html

Usage

VAMTIGER Bundle HTML can bundle HTML to a single compiled output file:

vamtiger-bundle-html --entryFilePath absolute/path/source/index.html --bundleFilePath --bundleFilePath build/index.html

The relativePath option can be used to reference entryFilePath and bundleFilePath relative to the current working directory:

vamtiger-bundle-html --relativePath --entryFilePath absolute/path/source/index.html --bundleFilePath --bundleFilePath build/index.html

Referencing the --bundleFilePath with the ts extension will generate the bundle as a Typescript file:

vamtiger-bundle-html --relativePath --entryFilePath absolute/path/source/index.html --bundleFilePath --bundleFilePath build/index.ts

The json option can be added to generate compiled output in JSON format:

vamtiger-bundle-html --relativePath --entryFilePath source/index.html --bundleFilePath --bundleFilePath build/index.json --json

The watch option can be added to generate compiled output each time a source file is updated:

vamtiger-bundle-html --relativePath --entryFilePath source/index.html --bundleFilePath --bundleFilePath build/index.json --json --watch

The copyBundleFilePath option will copy the compiled output to a defined path:

vamtiger-bundle-html --relativePath --entryFilePath source/index.html --bundleFilePath --bundleFilePath build/index.json --json --watch --copyBundleFilePath absolute/path/index.json

VAMTIGER Bundle HTML can also be defined as a custom script:

    ...
    scripts: {
        "bundle-css": "vamtiger-bundle-html --relativePath --entryFilePath source/index.css --bundleFilePath --bundleFilePath build/index.css",
        "watch": "vamtiger-bundle-html --relativePath --entryFilePath source/index.css --bundleFilePath --bundleFilePath build/index.css --watch"
    }
    ...