KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I wrote a simple npm module to precompile my handlebars templates when using django compressor to do post-processing for some client side components and found that I need to ship the npm module with a few js files. Currently I just assume no one is installing this with the global flag because I've "hard coded" the path to these dependencies in the npm module itself example layout of my npm module / * /bin * /lib/main.js * /vendor/ember.js Now inside main.js I want to use the ember.js file ... currently my hard coded approach looks like this var emberjs = fs.readFileSync('node_modules/django-ember-precompile/vendor/ember.js', 'utf8'); Again -this only works because I assume you install it local but I'd like to think node.js has a more legit way to get locally embedded files Anyone know how I can improve this to be more "global" friendly?
Tags (comma-separated)
Save Edits
Cancel