/installcat

Bundle your NPM dependencies on install for easy HTML includes

Primary LanguageJavaScript

installcat

Bundle npm dependencies on install, for easy HTML includes.

Installed Cat

usage

List each bundle to be build in a separate file installcat.json or inside package.json under property installcat

$ ls js/
$ cat installcat.json
{
  "js/build.js": {
    "ramda": "dist/ramda.js",
    "foo": "node_modules/foo/index.js"
  }
}
$ cat package.json
{
  ...
  "devDependencies": {
    "installcat": "*"
  },
  "scripts": {
    "prepublish": "installcat"
  }
}
$ npm install
$ ls js/
build.js

File build.js has the concatenated dist/ramda.js and node_modules/foo/index.js contents. Equivalent to

{
  "devDependencies": {
    "installcat": "*"
  },
  "scripts": {
    "prepublish": "installcat"
  },
  "installcat": {
    "js/build.js": {
      "ramda": "dist/ramda.js",
      "foo": "node_modules/foo/index.js"
    }
  }
}

See example/ for an example configuration.

3rd party modules used

  • debug - small debugging utility
  • q - A library for promises (CommonJS/Promises/A,B,D)
  • ramda - A practical functional library for JavaScript programmers.