Node.js: Is there a deploy module could merge javascript file and minify them?

Is there a deploy module in node.js could merge my javascript and css file

or compress javascript and css file and so on.

cuz I deploy my application at Platform-as-a-Service like appfog

so I can't expect the server itself could help me do that

mybe the module could?

This article on underappreciated NPM commands looks to skim over just what you're looking for. Specifically the ability to use preinstall hooks:

"scripts": {
    "preinstall": "./bin/custom-script.sh"
}

http://mechanics.flite.com/blog/2012/12/11/underappreciated-npm-commands/