Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use browserify for build #8

Open
mobidev111 opened this issue Sep 15, 2015 · 3 comments
Open

use browserify for build #8

mobidev111 opened this issue Sep 15, 2015 · 3 comments

Comments

@mobidev111
Copy link

browserify makes bundling the multiple modules much easier.

build task example:
https://github.com/vigetlabs/gulp-starter/blob/master/gulpfile.js/config.js
https://github.com/vigetlabs/gulp-starter/blob/33e33e763060e7052ee7b3da430a8dfdca050a4e/gulp/tasks/browserify.js

@jtomaszewski
Copy link
Owner

What would be the advantage of such solution?
Do we gain anything that we don't have in the current build process?

@mobidev111
Copy link
Author

browserify handles dependency management of your modules very well - I can add/remove a module simply by add/removing the corresponding require() - and during the build process this change is taken into account directly.

"This means that the bundle you generate is completely self-contained and has everything your application needs to work with a pretty negligible overhead."
https://github.com/substack/browserify-handbook#how-browserify-works

From your build process files I see that all js files in the app directory (whether needed or not) are concatenated during the build process

-> using browserify helps you to only add the referenced modules & thus automatically the resulting build artifact matches these modules

@jtomaszewski
Copy link
Owner

Yeah, but in Ionic apps propably:

  • you will load all the .js files from ./app/ directory anyway (if not, why would you have them there?)
  • all the files are available offline, so there's no delay or overload while loading them

I would still like to know what is a direct advantage of this solution. What do we gain that we don't have right now? Any real-world usage example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants