diff --git a/Gruntfile.js b/Gruntfile.js index 74decc8e9..936b7b447 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,4 +1,6 @@ module.exports = function(grunt) { + require('time-grunt')(grunt); + var pkg = grunt.file.readJSON('package.json'); var license = grunt.file.read('build/license-header.txt'); var verParts = pkg.version.split('.'); @@ -269,21 +271,6 @@ module.exports = function(grunt) { } }, browserify: { - options: { - transform: [ - require('babelify').configure({ - sourceMapRelative: './src/js' - }), - ['browserify-versionify', { - placeholder: '__VERSION__', - version: pkg.version - }], - ['browserify-versionify', { - placeholder: '__VERSION_NO_PATCH__', - version: version.majorMinor - }] - ] - }, build: { files: { 'build/temp/video.js': ['src/js/video.js'] @@ -296,6 +283,19 @@ module.exports = function(grunt) { banner: license, plugin: [ [ 'browserify-derequire' ] + ], + transform: [ + require('babelify').configure({ + sourceMapRelative: './src/js' + }), + ['browserify-versionify', { + placeholder: '__VERSION__', + version: pkg.version + }], + ['browserify-versionify', { + placeholder: '__VERSION_NO_PATCH__', + version: version.majorMinor + }] ] } }, @@ -303,8 +303,13 @@ module.exports = function(grunt) { files: { 'build/temp/tests.js': [ 'test/globals-shim.js', - 'test/unit/**/*.js', - 'test/api/**.js' + 'test/unit/**/*.js' + ] + }, + options: { + transform: [ + require('babelify').configure(), + 'browserify-istanbul' ] } } @@ -319,6 +324,8 @@ module.exports = function(grunt) { }, coveralls: { options: { + // warn instead of failing when coveralls errors + // we've seen coveralls 503 relatively frequently force: true }, all: { @@ -336,29 +343,8 @@ module.exports = function(grunt) { } }); - grunt.loadNpmTasks('grunt-videojs-languages'); - grunt.loadNpmTasks('grunt-contrib-connect'); - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.loadNpmTasks('grunt-contrib-cssmin'); - grunt.loadNpmTasks('grunt-sass'); - grunt.loadNpmTasks('grunt-karma'); - grunt.loadNpmTasks('videojs-doc-generator'); - grunt.loadNpmTasks('grunt-zip'); - grunt.loadNpmTasks('grunt-banner'); - grunt.loadNpmTasks('grunt-version'); - grunt.loadNpmTasks('chg'); - grunt.loadNpmTasks('grunt-fastly'); - grunt.loadNpmTasks('grunt-github-releaser'); - grunt.loadNpmTasks('grunt-aws-s3'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-browserify'); - grunt.loadNpmTasks('grunt-coveralls'); - grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.loadNpmTasks('grunt-exorcise'); + // load all the npm grunt tasks + require('load-grunt-tasks')(grunt); grunt.registerTask('build', [ 'clean:build', diff --git a/package.json b/package.json index 1d85b9998..0ced3fbf7 100644 --- a/package.json +++ b/package.json @@ -71,8 +71,10 @@ "karma-safari-launcher": "^0.1.1", "karma-sauce-launcher": "^0.2.8", "karma-sinon": "^1.0.3", + "load-grunt-tasks": "^3.1.0", "qunitjs": "~1.14.0", "sinon": "~1.9.1", + "time-grunt": "^1.1.1", "uglify-js": "~2.3.6", "videojs-doc-generator": "0.0.1" } diff --git a/src/js/core.js b/src/js/core.js index 8774f14fc..aa326a3a0 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -72,9 +72,6 @@ var videojs = function(id, options, ready){ return tag['player'] || new Player(tag, options, ready); }; -// Extended name, also available externally, window.videojs -// var videojs = window['videojs'] = vjs; - // CDN Version. Used to target right flash swf. videojs.CDN_VERSION = '__VERSION_NO_PATCH__'; videojs.ACCESS_PROTOCOL = ('https:' == document.location.protocol ? 'https://' : 'http://'); diff --git a/test/api/api.js b/test/api/api.js index c627f77dd..bf7c7977e 100644 --- a/test/api/api.js +++ b/test/api/api.js @@ -5,7 +5,7 @@ (function(){ -q.module('Player Minified'); +q.module('Player API'); test('videojs should exist on the window', function() { ok(window.videojs, 'videojs exists on the window'); diff --git a/test/index.html b/test/index.html index 41b1268b6..0e450bcfc 100644 --- a/test/index.html +++ b/test/index.html @@ -9,7 +9,12 @@
+ + + + +