f3816fe4 by Tom Johnson

- add grunt connect server

- add videojs build postinstall hook
- update package references
- add repository reference in package.json
1 parent 03abd4f0
...@@ -31,7 +31,7 @@ module.exports = function(grunt) { ...@@ -31,7 +31,7 @@ module.exports = function(grunt) {
31 'src/m3u8/m3u8-parser.js' 31 'src/m3u8/m3u8-parser.js'
32 ], 32 ],
33 dest: 'dist/videojs.hls.js' 33 dest: 'dist/videojs.hls.js'
34 }, 34 }
35 }, 35 },
36 uglify: { 36 uglify: {
37 options: { 37 options: {
...@@ -40,7 +40,7 @@ module.exports = function(grunt) { ...@@ -40,7 +40,7 @@ module.exports = function(grunt) {
40 dist: { 40 dist: {
41 src: '<%= concat.dist.dest %>', 41 src: '<%= concat.dist.dest %>',
42 dest: 'dist/videojs.hls.min.js' 42 dest: 'dist/videojs.hls.min.js'
43 }, 43 }
44 }, 44 },
45 qunit: { 45 qunit: {
46 files: ['test/**/*.html', '!test/perf.html'] 46 files: ['test/**/*.html', '!test/perf.html']
...@@ -66,7 +66,13 @@ module.exports = function(grunt) { ...@@ -66,7 +66,13 @@ module.exports = function(grunt) {
66 '!test/tsSegment.js', 66 '!test/tsSegment.js',
67 '!test/fixtures/*.js', 67 '!test/fixtures/*.js',
68 '!test/manifest/**'] 68 '!test/manifest/**']
69 }
69 }, 70 },
71 connect: {
72 dev: {
73 port: 8000,
74 base: '.'
75 }
70 }, 76 },
71 watch: { 77 watch: {
72 gruntfile: { 78 gruntfile: {
...@@ -80,8 +86,8 @@ module.exports = function(grunt) { ...@@ -80,8 +86,8 @@ module.exports = function(grunt) {
80 test: { 86 test: {
81 files: '<%= jshint.test.src %>', 87 files: '<%= jshint.test.src %>',
82 tasks: ['jshint:test', 'qunit'] 88 tasks: ['jshint:test', 'qunit']
83 }, 89 }
84 }, 90 }
85 }); 91 });
86 92
87 // These plugins provide necessary tasks. 93 // These plugins provide necessary tasks.
...@@ -91,6 +97,7 @@ module.exports = function(grunt) { ...@@ -91,6 +97,7 @@ module.exports = function(grunt) {
91 grunt.loadNpmTasks('grunt-contrib-qunit'); 97 grunt.loadNpmTasks('grunt-contrib-qunit');
92 grunt.loadNpmTasks('grunt-contrib-jshint'); 98 grunt.loadNpmTasks('grunt-contrib-jshint');
93 grunt.loadNpmTasks('grunt-contrib-watch'); 99 grunt.loadNpmTasks('grunt-contrib-watch');
100 grunt.loadNpmTasks('grunt-contrib-connect');
94 101
95 grunt.registerTask('manifests-to-js', 'Wrap the test fixtures and output' + 102 grunt.registerTask('manifests-to-js', 'Wrap the test fixtures and output' +
96 ' so they can be loaded in a browser', 103 ' so they can be loaded in a browser',
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
44 type="application/x-mpegURL"> 44 type="application/x-mpegURL">
45 </video> 45 </video>
46 <script> 46 <script>
47 videojs.options.flash.swf = 'node_modules/video.js/dist/video-js/video-js.swf'; 47 videojs.options.flash.swf = 'node_modules/videojs-swf/dist/video-js.swf';
48 // initialize the player 48 // initialize the player
49 var player = videojs('video'); 49 var player = videojs('video');
50 50
......
...@@ -4,9 +4,14 @@ ...@@ -4,9 +4,14 @@
4 "engines": { 4 "engines": {
5 "node": ">= 0.8.0" 5 "node": ">= 0.8.0"
6 }, 6 },
7 "repository": {
8 "type": "git",
9 "url": "git@github.com:videojs/videojs-contrib-hls.git"
10 },
7 "license": "Apache 2", 11 "license": "Apache 2",
8 "scripts": { 12 "scripts": {
9 "test": "grunt" 13 "test": "grunt",
14 "postinstall": "echo 'fire post install' && cd node_modules/video.js/ && npm install && grunt"
10 }, 15 },
11 "devDependencies": { 16 "devDependencies": {
12 "grunt-contrib-jshint": "~0.6.0", 17 "grunt-contrib-jshint": "~0.6.0",
...@@ -15,10 +20,12 @@ ...@@ -15,10 +20,12 @@
15 "grunt-contrib-uglify": "~0.2.0", 20 "grunt-contrib-uglify": "~0.2.0",
16 "grunt-contrib-watch": "~0.4.0", 21 "grunt-contrib-watch": "~0.4.0",
17 "grunt-contrib-clean": "~0.4.0", 22 "grunt-contrib-clean": "~0.4.0",
23 "grunt-contrib-connect": "~0.6.0",
18 "grunt": "~0.4.1" 24 "grunt": "~0.4.1"
19 }, 25 },
20 "dependencies": { 26 "dependencies": {
21 "video.js": "git+https://github.com/dmlap/video-js.git#v4.3.0-10", 27 "video.js": "git+https://github.com/videojs/video.js.git",
28 "videojs-swf": "git+https://github.com/seniorflexdeveloper/video-js-swf.git",
22 "videojs-contrib-media-sources": "git+https://github.com/dmlap/videojs-contrib-media-sources.git#hotfix/misc-fixes" 29 "videojs-contrib-media-sources": "git+https://github.com/dmlap/videojs-contrib-media-sources.git#hotfix/misc-fixes"
23 } 30 }
24 } 31 }
......