Permalink
Browse files

Use bower for speed framework dependencies. Add .bowerrc.

  • Loading branch information...
1 parent e4536ab commit 677b92a4dd21a382bf614e09b8307669bb37e1af @timmywil timmywil committed Aug 27, 2013
Showing with 20 additions and 2,380 deletions.
  1. +3 −0 .bowerrc
  2. +0 −3 .gitmodules
  3. +5 −1 bower.json
  4. +1 −1 speed/.jshintrc
  5. +0 −1 speed/benchmark.js
  6. +0 −129 speed/domReady.js
  7. +1 −1 speed/index.html
  8. +0 −1,934 speed/require.js
  9. +10 −2 speed/speed.js
  10. +0 −308 speed/text.js
View
@@ -0,0 +1,3 @@
+{
+ "directory": "bower_components"
+}
View
@@ -1,3 +0,0 @@
-[submodule "speed/benchmark.js"]
- path = speed/benchmark.js
- url = git://github.com/bestiejs/benchmark.js.git
View
@@ -3,7 +3,11 @@
"version": "1.10.7-pre",
"main": "./dist/sizzle.js",
"devDependencies": {
- "qunit": "~1.11.0"
+ "qunit": "~1.11.0",
+ "benchmark": "~1.0.0",
+ "requirejs": "~2.1.8",
+ "requirejs-domready": "~2.0.1",
+ "requirejs-text": "~2.0.10"
},
"ignore": [
"**/.*",
View
@@ -21,6 +21,6 @@
"predef": [
"console",
- "define"
+ "require"
]
}
Submodule benchmark.js deleted from 985bdb
View
@@ -1,129 +0,0 @@
-/**
- * @license RequireJS domReady 2.0.1 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
- * Available via the MIT or new BSD license.
- * see: http://github.com/requirejs/domReady for details
- */
-/*jslint */
-/*global require: false, define: false, requirejs: false,
- window: false, clearInterval: false, document: false,
- self: false, setInterval: false */
-
-
-define(function () {
- 'use strict';
-
- var isTop, testDiv, scrollIntervalId,
- isBrowser = typeof window !== "undefined" && window.document,
- isPageLoaded = !isBrowser,
- doc = isBrowser ? document : null,
- readyCalls = [];
-
- function runCallbacks(callbacks) {
- var i;
- for (i = 0; i < callbacks.length; i += 1) {
- callbacks[i](doc);
- }
- }
-
- function callReady() {
- var callbacks = readyCalls;
-
- if (isPageLoaded) {
- //Call the DOM ready callbacks
- if (callbacks.length) {
- readyCalls = [];
- runCallbacks(callbacks);
- }
- }
- }
-
- /**
- * Sets the page as loaded.
- */
- function pageLoaded() {
- if (!isPageLoaded) {
- isPageLoaded = true;
- if (scrollIntervalId) {
- clearInterval(scrollIntervalId);
- }
-
- callReady();
- }
- }
-
- if (isBrowser) {
- if (document.addEventListener) {
- //Standards. Hooray! Assumption here that if standards based,
- //it knows about DOMContentLoaded.
- document.addEventListener("DOMContentLoaded", pageLoaded, false);
- window.addEventListener("load", pageLoaded, false);
- } else if (window.attachEvent) {
- window.attachEvent("onload", pageLoaded);
-
- testDiv = document.createElement('div');
- try {
- isTop = window.frameElement === null;
- } catch (e) {}
-
- //DOMContentLoaded approximation that uses a doScroll, as found by
- //Diego Perini: http://javascript.nwbox.com/IEContentLoaded/,
- //but modified by other contributors, including jdalton
- if (testDiv.doScroll && isTop && window.external) {
- scrollIntervalId = setInterval(function () {
- try {
- testDiv.doScroll();
- pageLoaded();
- } catch (e) {}
- }, 30);
- }
- }
-
- //Check if document already complete, and if so, just trigger page load
- //listeners. Latest webkit browsers also use "interactive", and
- //will fire the onDOMContentLoaded before "interactive" but not after
- //entering "interactive" or "complete". More details:
- //http://dev.w3.org/html5/spec/the-end.html#the-end
- //http://stackoverflow.com/questions/3665561/document-readystate-of-interactive-vs-ondomcontentloaded
- //Hmm, this is more complicated on further use, see "firing too early"
- //bug: https://github.com/requirejs/domReady/issues/1
- //so removing the || document.readyState === "interactive" test.
- //There is still a window.onload binding that should get fired if
- //DOMContentLoaded is missed.
- if (document.readyState === "complete") {
- pageLoaded();
- }
- }
-
- /** START OF PUBLIC API **/
-
- /**
- * Registers a callback for DOM ready. If DOM is already ready, the
- * callback is called immediately.
- * @param {Function} callback
- */
- function domReady(callback) {
- if (isPageLoaded) {
- callback(doc);
- } else {
- readyCalls.push(callback);
- }
- return domReady;
- }
-
- domReady.version = '2.0.1';
-
- /**
- * Loader Plugin API method
- */
- domReady.load = function (name, req, onLoad, config) {
- if (config.isBuild) {
- onLoad(null);
- } else {
- domReady(onLoad);
- }
- };
-
- /** END OF PUBLIC API **/
-
- return domReady;
-});
View
@@ -45,6 +45,6 @@
<footer>
<small>Copyright &copy; 2013 jQuery Foundation</small>
</footer>
- <script src="require.js" data-main="speed"></script>
+ <script src="../bower_components/requirejs/require.js" data-main="speed"></script>
</body>
</html>
Oops, something went wrong.

0 comments on commit 677b92a

Please sign in to comment.