samedi 14 février 2015

emberjs, node and dependencies

I declare dependencies in my app.js (ember) file, such as:



var _ = require('underscore');


Since my app.js file will be sent to the client and need to execute in a browser, how would this code be made available to the client?


Currently I'm using lineman to concatenate and uglify all my js files, and inside my vendors folder I did include underscore.min.js (all of this get bundled up into app.js) - yet my app isn't working.


Could someone kindly explain the process of adding npm packages to an ember app and the resulting requirements on the client side?





Aucun commentaire:

Enregistrer un commentaire