Skip to content

Commit

Permalink
update main section of bower.json with bundle
Browse files Browse the repository at this point in the history
This is proposed for two reasons:
1. pulling the JS portion of Ionic into compliance with the bower.json spec ("The entry-point files necessary to use your package. Only one file per filetype."). I am not sure about how to handle the fonts.
2. making build process simpler for use with bower-main-files or bower-installer, as they can read the main section and grab only what is required.
  • Loading branch information
laidig committed Nov 21, 2015
1 parent c5a4f7d commit bfd9f08
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"main": [
"release/css/ionic.css",
"release/fonts/*",
"release/js/ionic.js",
"release/js/ionic-angular.js"
"release/js/ionic.bundle.js"
],
"keywords": [
"mobile",
Expand Down

3 comments on commit bfd9f08

@john-banks
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this now results in angular being brought into the project twice. To achieve what you wanted, the bundle file should be just ionic.js+ionic-angular.js but I suspect that will break things elsewhere.

I made an issue here #4789

@laidig
Copy link
Author

@laidig laidig commented on bfd9f08 Dec 15, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@john-banks
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For bower packages you shouldn't be bundling all your projects external dependencies into a concatenated file, they should be specified in dependencies: {}

ionic.bundle.js now contains angular.js and angular is a dependency meaning that two instances of angular are brought in.

This also breaks specifying dependency versions (through overrides or otherwise), so for example I might want to use angular 1.4.8 for a new feature and know that there are no breaking changes but I can't as ionic is now hard coded to 1.4.3

Please sign in to comment.