3 ms·
yea i know but practically it looks different for me. 1.) with tools like browserify i have to look at the folder structure. if i move things around i have to
by Polarity 12y ago
yea i know but practically it looks different for me.
1.) with tools like browserify i have to look at the folder structure. if i move things around i have to change some paths inside my codebase. or i have to change a map config. with my approach i need two paths. the path to my bower package.json to include all my bower packages and the path to my codebase with two fixed js files. beneath that directory level i can organize stuff how i want and change it every time completely. create folders, move things, rename stuff etc. my script concats always the libs first, then my bootstrap.js, all my app modules and at last a init.js. every project looks the same and works the same. it´s compatible with every big frontend framework and easy to understand.
2.) most bower packages are in js global format. so they just have to be loaded first at runtime and the order of loading things is very clear.
3.) im aware that browserify aims at some problems like lazy loading or reuse stuff in the background/frontend but i am not having to deal with those problems atm. and dont know if i ever have to...
- whatthemick 12y ago"with tools like browserify i have to look at the folder structure" I don't think Browserify cares about your directory structure as long as it can find the entry file it will figure out the rest based on your require calls (and also make sure they are in the right order dependency wise)