Last active
August 29, 2015 14:11
-
-
Save consideRatio/d002dc30fbd0a912d5d9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "exjobb", | |
| "dependencies": { | |
| "_comment": "### --- The five libraries I'd prefere to not include in vendor.json and instead request from a CDN --- ###", | |
| "handlebars": "^2.0.0", | |
| "jquery": "^2.1.1", | |
| "bootstrap": "^3.1.1", | |
| "ember": "^1.9.0", | |
| "ember-data": ">= 1.0.0-beta.12", | |
| "ember-resolver": "~0.1.10", | |
| "loader.js": "stefanpenner/loader.js#1.0.1", | |
| "ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3", | |
| "ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4", | |
| "ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2", | |
| "ember-qunit": "0.1.8", | |
| "ember-qunit-notifications": "0.0.4", | |
| "qunit": "~1.15.0" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Exjobb</title> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| {{content-for 'head'}} | |
| <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.css" > | |
| <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css"> | |
| <link rel="stylesheet" href="assets/vendor.css"> | |
| <link rel="stylesheet" href="assets/exjobb.css"> | |
| </head> | |
| <body> | |
| {{content-for 'body'}} | |
| <!-- ### --- The five libraries I'd prefere to not include in vendor.json and instead request from a CDN, like i do below --- ### --> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/2.0.0/handlebars.js"></script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js"></script> | |
| <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.js"></script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/ember.js/1.9.0/ember.js"></script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/ember-data.js/1.0.0-beta.12/ember-data.js"></script> | |
| <script src="assets/vendor.js"></script> | |
| <script src="assets/exjobb.js"></script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| If I use the <script> tags to include the five libs (handlebars/jquery/bootstrap/ember/ember-data), | |
| and remove those five from the bower.json file... | |
| ... my app fails with errors like: | |
| Uncaught Error: Assertion Failed: The initializer 'ember-data' has already been registered (ember.js:3902) | |
| (onLoad is included in the stack-trace) | |
| If i on the other hand dont use the <script> tags in the index.html file, and instead include | |
| the libraries in the bower.json file, it all works. | |
| The question: Can i somehow get to use CDN's instead of including all in vendor.js using bower? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment