Saturday, 15 September 2012

node.js - is good practice to include my modules in node_modules for make require search easy,if not why not? -



node.js - is good practice to include my modules in node_modules for make require search easy,if not why not? -

is practice include modules in node_modules create require search easy,if not why not?

explanation:

in node.js cms calipso( https://github.com/cliftonc/calipso) modules not within node_modules: include modules without auto option:

calipso = require(path.join(rootpath, 'lib/calipso'));

vs if within node_modules:

calipso = require('calipso');

node_modules typically ignored in version command (git, etc) , of developers assume folder contains packages listed in package.json. can imagine approach on updating modules removing folder , executing npm install. considering these rather keeping own modules in node_modules not consistent node.js workflow.

update: assuming "my modules" set of files. if modules "npm" modules, can restored executing "npm install" fine maintain them in node_modules.

node.js express

No comments:

Post a Comment