For starters this means deduping and pruning the dependency tree, which
npm can do for me. But I’d also like to remove all the
I know about
node-browserify but my app will be running in a CommonJS environment, not a browser, so I’d like to keep the modules separate and load them with
I’m thinking about writing a Grunt plugin that walks the dependency tree using
require (just loading the modules directly without needing a
package.json). But I’d like to make sure no one has done this for me before I tackle it.
grunt-package-minifier. My use case is a bit unusual since we are developing a cross-browser extension framework. Like
Browserify and unlike standard NodeJS deployments we want to minimize the size of our distribution, including any CommonJS modules. But unlike
Browserify we support CommonJS so we can keep the module structure rather than concatenating everything into one big file.
Essentially I strip all the
package.json, README, test files, etc. from
grun-package-minifier is not found ( This is not an actual answer. I wanted to commet in above answer but I do not have sufficient reputation yet 🙁 ).
npm install grunt-package-minifier –save-dev
npm WARN package.json firstname.lastname@example.org No repository field.
npm WARN package.json email@example.com No README data
npm ERR! 404 404 Not Found: grunt-package-minifier
npm ERR! 404
npm ERR! 404 ‘grunt-package-minifier’ is not in the npm registry.