node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…


Combine & inline & minify js/css/html for web pages, build single file app


Combine, inline, minify tool for js/css/html

Linux: install global, for windows please install Visual C++ 2010 Express, first.

sudo npm install web-combiner -g


#true: minifiy css/js/html after inlined to one page.
inliner mob/mob-lite.html mob/mob-lite.min.html true

install locally

npm install web-combiner

node app:

var combiner = require("web-combiner")
  , inliner = combiner.inliner
  , combine = combiner.combine
  , combineEx = combiner.combineEx;


Combine files into one

  • -in: input file path, it can be configuration file or dictionary;
  • -out: output file path;
  • -watch: keep watching the changes, if no parameter just combine once;
combine -in static/css  -out static/live/src.js -watch true
combine -in static/js/  -out static/live/src.js -watch true


Combine files from configuration

#Configuration File

#Combine Directory, doesn't run combine at the first time

#Combine Javascript
#Minify the combined javascript
$java -jar tools/yuicompressor-2.4.7.jar static/live/debug.js -o static/live/debug.min.js

#Combine CSS, just combine at the first time, doens't watch change on it.
#Minify the combined css
$java -jar tools/yuicompressor-2.4.7.jar static/live/debug.css -o static/live/debug.min.css

In configuration file

  • ?: Parameter begin with "?"
  • $: Commands that execute after combined.
  • in: Input file path, it can be configuration file or dictionary;
  • out: output file path;
  • run: Running combine at the first time?
  • watch: Keep watching the changes?
combineEx -in static/MakeFile.cfg -watch true -run true

In command line, priority will be higher than parameters in configuration file

  • -in: Input file path, it can be configuration file or dictionary;
  • -run: Running combine at the first time?
  • -watch: Keep watching the changes?


Make css/js inlined

#debug mode just inlined
$ inliner mob/mob-lite.html mob/mob-lite.src.html
#release mode inlined and minified
$ inliner mob/mob-lite.html mob/mob-lite.min.html true