Permalink
Browse files

Build: Manage dependencies with bower

Fixes gh-6369
  • Loading branch information...
gseguin committed Dec 31, 2013
1 parent b989774 commit d14b90ded2f3e3845f001d15047f4a4d4fad3840
Showing with 144 additions and 22 deletions.
  1. +82 −0 Gruntfile.js
  2. +29 −0 bower.json
  3. +8 −8 external/qunit.css
  4. +1 −0 external/qunit.js
  5. +20 −9 js/jquery.hashchange.js
  6. +0 −2 js/jquery.js
  7. +1 −1 js/jquery.ui.core.js
  8. +1 −1 js/jquery.ui.widget.js
  9. +2 −1 package.json
View
@@ -736,6 +736,85 @@ module.exports = function( grunt ) {
}
},
bowercopy: {
options: {
// Bower components folder will be removed afterwards
clean: true
},
tests: {
options: {
destPrefix: "external"
},
files: {
"qunit.js": "qunit/qunit/qunit.js",
"qunit.css": "qunit/qunit/qunit.css",
"jshint/jshint.js": "jshint/dist/jshint.js"
}
},
requirejs: {
options: {
destPrefix: "external"
},
files: {
"requirejs/require.js": "requirejs/require.js",
"requirejs/plugins/text.js": "requirejs-text/text.js",
"requirejs/plugins/json.js": "requirejs-plugins/src/json.js"
}
},
jquery: {
options: {
destPrefix: "js"
},
files: {
"jquery.js": "jquery/jquery.js"
}
},
"jquery-ui": {
options: {
destPrefix: "js",
copyOptions: {
process: function( content ) {
var version = grunt.file.readJSON( "bower.json" ).dependencies[ "jquery-ui" ];
if ( /#/.test( version ) ) {
version = version.split( "#" )[ 1 ];
}
return content.replace( /@VERSION/g, version );
}
}
},
files: {
"jquery.ui.core.js": "jquery-ui/ui/jquery.ui.core.js",
"jquery.ui.widget.js": "jquery-ui/ui/jquery.ui.widget.js"
}
},
"jquery-ui-tabs": {
options: {
destPrefix: "js",
copyOptions: {
process: function( content ) {
var version = grunt.file.readJSON( "bower.json" ).dependencies[ "jquery-ui-tabs" ];
if ( /#/.test( version ) ) {
version = version.split( "#" )[ 1 ];
}
return content.replace( /@VERSION/g, version );
}
}
},
files: {
"widgets/jquery.ui.tabs.js": "jquery-ui-tabs/ui/jquery.ui.tabs.js"
}
},
"jquery-plugins": {
options: {
destPrefix: "js"
},
files: {
"jquery.hashchange.js": "jquery-hashchange/jquery.ba-hashchange.js"
}
}
},
clean: {
dist: [ dist ],
git: [ path.join( dist, "git" ) ],
@@ -746,6 +825,7 @@ module.exports = function( grunt ) {
});
// grunt plugins
grunt.loadNpmTasks( "grunt-bowercopy" );
grunt.loadNpmTasks( "grunt-contrib-jshint" );
grunt.loadNpmTasks( "grunt-contrib-clean" );
grunt.loadNpmTasks( "grunt-contrib-copy" );
@@ -807,6 +887,8 @@ module.exports = function( grunt ) {
grunt.registerTask( "dist:release", [ "release:init", "dist", "cdn" ] );
grunt.registerTask( "dist:git", [ "dist", "clean:git", "config:copy:git:-git", "copy:git" ] );
grunt.registerTask( "updateDependencies", [ "bowercopy" ] );
grunt.registerTask( "test", [ "jshint", "config:fetchHeadHash", "js:release", "connect", "qunit:http" ] );
grunt.registerTask( "test:ci", [ "qunit_junit", "connect", "qunit:http" ] );
View
@@ -0,0 +1,29 @@
{
"name": "jquery-mobile",
"version": "1.4.1pre",
"main": [
"js/jquery.mobile.js",
"css/themes/default/jquery.mobile.css"
],
"ignore": [
".jshintrc",
"**/*.txt",
"build",
"demos",
"tests",
"tools"
],
"dependencies": {
"jquery": "1.10.2",
"jquery-ui": "jquery/jquery-ui#c0ab71056b936627e8a7821f03c044aec6280a40",
"jquery-ui-tabs": "jquery/jquery-ui#fadf2b312a05040436451c64bbfaf4814bc62c56",
"jquery-hashchange": "gseguin/jquery-hashchange#77c4b3551fc6bdc2ac6b22b2641cfd7ac6b212d2"
},
"devDependencies": {
"requirejs": "2.1.2",
"qunit": "1.9.0",
"jshint": "2.4.0",
"requirejs-text": "2.0.3",
"requirejs-plugins": "millermedeiros/requirejs-plugins#34330a5d735474ac0b518eb1eb270c9e5505a537"
}
}
View
@@ -38,8 +38,10 @@
line-height: 1em;
font-weight: normal;
-webkit-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
-webkit-border-top-right-radius: 5px;
-webkit-border-top-left-radius: 5px;
}
#qunit-header a {
@@ -111,8 +113,9 @@
background-color: #fff;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
#qunit-tests table {
@@ -187,8 +190,10 @@
}
#qunit-tests > li:last-child {
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
}
#qunit-tests .fail { color: #000000; background-color: #EE5757; }
@@ -224,8 +229,3 @@
width: 1000px;
height: 1000px;
}
[data-nstest-role='page'], [data-nstest-role='dialog'] {
position: absolute !important;
top: -10000px !important;
}

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Jan 30, 2014

Member

removing this has broken the styles on all our tests

@arschmitz

arschmitz Jan 30, 2014

Member

removing this has broken the styles on all our tests

View
@@ -1328,6 +1328,7 @@ function registerLoggingCallback( key ) {
// Supports deprecated method of completely overwriting logging callbacks
function runLoggingCallbacks( key, scope, args ) {
//debugger;
var i, callbacks;
if ( QUnit.hasOwnProperty( key ) ) {
QUnit[ key ].call(scope, args );
View
@@ -1,5 +1,14 @@
/*!
* jQuery hashchange event - v1.3 - 7/21/2010
* http://benalman.com/projects/jquery-hashchange-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
// Script: jQuery hashchange event
//
//
// *Version: 1.3, Last updated: 7/21/2010*
//
// Project Home - http://benalman.com/projects/jquery-hashchange-plugin/
@@ -76,7 +85,9 @@
// extra awesomeness that BBQ provides. This plugin will be included as
// part of jQuery BBQ, but also be available separately.
(function( $, window, undefined ) {
(function($,window,undefined){
'$:nomunge'; // Used by YUI compressor.
// Reused string.
var str_hashchange = 'hashchange',
@@ -242,14 +253,14 @@
// event for browsers that don't natively support it, including creating a
// polling loop to watch for hash changes and in IE 6/7 creating a hidden
// Iframe to enable back and forward.
fake_onhashchange = (function() {
fake_onhashchange = (function(){
var self = {},
timeout_id,
// Remember the initial hash so it doesn't get triggered immediately.
last_hash = get_fragment(),
fn_retval = function( val ) { return val; },
fn_retval = function(val){ return val; },
history_set = fn_retval,
history_get = fn_retval;
@@ -286,7 +297,7 @@
// vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
// vvvvvvvvvvvvvvvvvvv REMOVE IF NOT SUPPORTING IE6/7/8 vvvvvvvvvvvvvvvvvvv
// vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
window.attachEvent && !window.addEventListener && !supports_onhashchange && (function() {
window.attachEvent && !window.addEventListener && !supports_onhashchange && (function(){
// Not only do IE6/7 need the "magical" Iframe treatment, but so does IE8
// when running in "IE7 compatibility" mode.
@@ -295,7 +306,7 @@
// When the event is bound and polling starts in IE 6/7, create a hidden
// Iframe for history handling.
self.start = function() {
self.start = function(){
if ( !iframe ) {
iframe_src = $.fn[ str_hashchange ].src;
iframe_src = iframe_src && iframe_src + get_fragment();
@@ -306,7 +317,7 @@
// When Iframe has completely loaded, initialize the history and
// start polling.
.one( 'load', function() {
.one( 'load', function(){
iframe_src || history_set( get_fragment() );
poll();
})
@@ -322,7 +333,7 @@
// prettify the back/next history menu entries. Since IE sometimes
// errors with "Unspecified error" the very first time this is set
// (yes, very useful) wrap this with a try/catch block.
doc.onpropertychange = function() {
doc.onpropertychange = function(){
try {
if ( event.propertyName === 'title' ) {
iframe.document.title = doc.title;
@@ -359,7 +370,7 @@
iframe_doc.open();
// Set document.domain for the Iframe document as well, if necessary.
domain && iframe_doc.write( '<script>document.domain="' + domain + '"<\/script>' );
domain && iframe_doc.write( '<script>document.domain="' + domain + '"</script>' );
iframe_doc.close();
View
@@ -797,7 +797,6 @@ jQuery.extend({
}
}
// Flatten any nested arrays
return core_concat.apply( [], ret );
},
@@ -8200,7 +8199,6 @@ jQuery.extend({
}
}
// if no content
if ( status === 204 || s.type === "HEAD" ) {
statusText = "nocontent";
View
@@ -290,4 +290,4 @@ $.ui.plugin = {
}
};
})( jQuery );
})( jQuery );
View
@@ -1,5 +1,5 @@
/*!
* jQuery UI Widget c0ab71056b936627e8a7821f03c044aec6280a40N
* jQuery UI Widget c0ab71056b936627e8a7821f03c044aec6280a40
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
View
@@ -46,7 +46,8 @@
"xmlhttprequest": "1.6.0",
"semver": "2.2.1",
"cheerio": "0.12.4",
"underscore": "1.5.2"
"underscore": "1.5.2",
"grunt-bowercopy": "0.5.0"
},
"main": "Gruntfile.js",
"engines": {

0 comments on commit d14b90d

Please sign in to comment.