hh54188
hh54188

Reputation: 15646

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?

Upvotes: 1

Views: 274

Answers (1)

jholloman
jholloman

Reputation: 1979

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/

Upvotes: 1

Related Questions