1
0
mirror of https://github.com/videojs/video.js.git synced 2025-10-31 00:08:01 +02:00

Updated grunt and grunt-contrib versions to fix PhantomJS bug

Also changed some additional code to fix new jshint issues found by new jshint version.
This commit is contained in:
Steve Heffernan
2013-04-09 10:42:41 -07:00
parent 0aa814fae7
commit c74f39318f
4 changed files with 19 additions and 18 deletions

View File

@@ -76,6 +76,7 @@ module.exports = function(grunt) {
// Loading predefined source order from source-loader.js
// Trust me, this is the easist way to do it so far.
var blockSourceLoading = true;
var sourceFiles; // Needed to satisfy jshint
eval(grunt.file.read('./build/source-loader.js'));
// Fix windows file path delimiter issue
@@ -104,18 +105,18 @@ module.exports = function(grunt) {
var done = this.async();
var exec = require('child_process').exec;
var externs = this.file.externs || [];
var dest = this.file.dest;
var externs = this.files[0].externs || [];
var dest = this.files[0].dest;
var files = [];
// Make sure deeper directories exist for compiler
grunt.file.write(dest, '');
if (this.data.sourcelist) {
files = files.concat(grunt.file.read(this.data.sourcelist).split(','));
if (this.files[0].sourcelist) {
files = files.concat(grunt.file.read(this.files[0].sourcelist).split(','));
}
if (this.file.src) {
files = files.concat(this.file.src);
if (this.files[0].src) {
files = files.concat(this.files[0].src);
}
var command = 'java -jar build/compiler/compiler.jar'

View File

@@ -19,10 +19,10 @@
},
"devDependencies": {
"grunt-cli": "~0.1.0",
"grunt": "0.4.0rc4",
"grunt-contrib-jshint": "https://github.com/gruntjs/grunt-contrib-jshint/archive/7fd70e86c5a8d489095fa81589d95dccb8eb3a46.tar.gz",
"grunt": "~0.4.0",
"grunt-contrib-jshint": "~0.4.3",
"grunt-contrib-watch": "~0.1.4",
"grunt-contrib-qunit": "0.1.0",
"grunt-contrib-qunit": "~0.2.1",
"calcdeps": "~0.1.7",
"grunt-contrib-clean": "~0.4.0a",
"grunt-contrib-copy": "~0.3.2",

View File

@@ -1,3 +1,5 @@
var hasOwnProp = Object.prototype.hasOwnProperty;
/**
* Creates an element and applies properties.
* @param {String=} tagName Name of tag to be created.
@@ -8,7 +10,7 @@ vjs.createEl = function(tagName, properties){
var el = document.createElement(tagName || 'div');
for (var propName in properties){
if (properties.hasOwnProperty(propName)) {
if (hasOwnProp.call(properties, propName)) {
//el[propName] = properties[propName];
// Not remembering why we were checking for dash
// but using setAttribute means you have to use getAttribute
@@ -43,8 +45,6 @@ vjs.capitalize = function(string){
* @type {Object}
*/
vjs.obj = {};
vjs.obj.toString = Object.prototype.toString;
vjs.obj.hasOwnProperty = Object.prototype.hasOwnProperty;
/**
* Loop through each property in an object and call a function
@@ -55,7 +55,7 @@ vjs.obj.hasOwnProperty = Object.prototype.hasOwnProperty;
*/
vjs.obj.each = function(obj, fn, context){
for (var key in obj) {
if (vjs.obj.hasOwnProperty.call(obj, key)) {
if (hasOwnProp.call(obj, key)) {
fn.call(context || this, key, obj[key]);
}
}
@@ -70,7 +70,7 @@ vjs.obj.each = function(obj, fn, context){
vjs.obj.merge = function(obj1, obj2){
if (!obj2) { return obj1; }
for (var key in obj2){
if (vjs.obj.hasOwnProperty.call(obj2, key)) {
if (hasOwnProp.call(obj2, key)) {
obj1[key] = obj2[key];
}
}
@@ -94,7 +94,7 @@ vjs.obj.deepMerge = function(obj1, obj2){
obj1 = vjs.obj.copy(obj1);
for (key in obj2){
if (vjs.obj.hasOwnProperty.call(obj2, key)) {
if (hasOwnProp.call(obj2, key)) {
val1 = obj1[key];
val2 = obj2[key];
@@ -126,7 +126,7 @@ vjs.obj.copy = function(obj){
vjs.obj.isPlain = function(obj){
return !!obj
&& typeof obj === 'object'
&& vjs.obj.toString.call(obj) === '[object Object]'
&& obj.toString() === '[object Object]'
&& obj.constructor === Object;
};

View File

@@ -117,7 +117,7 @@ test('Plugins should get events in registration order', function() {
expectedOrder.push(name);
plugin(name);
}
vjs.plugin('testerPlugin', function (opts) {
this.trigger('test');
});
@@ -150,7 +150,7 @@ test('Plugins should not get events after stopImmediatePropagation is called', f
expectedOrder.push(name);
plugin(name);
}
vjs.plugin('testerPlugin', function (opts) {
this.trigger('test');
});