39f7051b by Tom Johnson

- Update Node.js requirment version in package.json.

- Grunt dev environment setup with connect, watch.
1 parent 7b8f263f
...@@ -71,10 +71,18 @@ module.exports = function(grunt) { ...@@ -71,10 +71,18 @@ module.exports = function(grunt) {
71 } 71 }
72 }, 72 },
73 connect: { 73 connect: {
74 dev: { 74 dev: {
75 port: 8000, 75 options: {
76 base: '.' 76 port: 9999,
77 keepalive: true
77 } 78 }
79 }
80 },
81 open : {
82 dev : {
83 path: 'http://127.0.0.1:<%= connect.dev.options.port %>/example.html',
84 app: 'Google Chrome'
85 }
78 }, 86 },
79 watch: { 87 watch: {
80 gruntfile: { 88 gruntfile: {
...@@ -89,6 +97,14 @@ module.exports = function(grunt) { ...@@ -89,6 +97,14 @@ module.exports = function(grunt) {
89 files: '<%= jshint.test.src %>', 97 files: '<%= jshint.test.src %>',
90 tasks: ['jshint:test', 'qunit'] 98 tasks: ['jshint:test', 'qunit']
91 } 99 }
100 },
101 concurrent: {
102 dev: {
103 tasks: ['connect', 'open', 'watch'],
104 options: {
105 logConcurrentOutput: true
106 }
107 }
92 } 108 }
93 }); 109 });
94 110
...@@ -100,6 +116,8 @@ module.exports = function(grunt) { ...@@ -100,6 +116,8 @@ module.exports = function(grunt) {
100 grunt.loadNpmTasks('grunt-contrib-jshint'); 116 grunt.loadNpmTasks('grunt-contrib-jshint');
101 grunt.loadNpmTasks('grunt-contrib-watch'); 117 grunt.loadNpmTasks('grunt-contrib-watch');
102 grunt.loadNpmTasks('grunt-contrib-connect'); 118 grunt.loadNpmTasks('grunt-contrib-connect');
119 grunt.loadNpmTasks('grunt-open');
120 grunt.loadNpmTasks('grunt-concurrent');
103 121
104 grunt.registerTask('manifests-to-js', 'Wrap the test fixtures and output' + 122 grunt.registerTask('manifests-to-js', 'Wrap the test fixtures and output' +
105 ' so they can be loaded in a browser', 123 ' so they can be loaded in a browser',
...@@ -145,6 +163,9 @@ module.exports = function(grunt) { ...@@ -145,6 +163,9 @@ module.exports = function(grunt) {
145 grunt.file.write('tmp/expected.js', jsExpected); 163 grunt.file.write('tmp/expected.js', jsExpected);
146 }); 164 });
147 165
166 // Launch a Development Environment
167 grunt.registerTask('dev', 'Launching Dev Environment', 'concurrent:dev');
168
148 // Default task. 169 // Default task.
149 grunt.registerTask('default', 170 grunt.registerTask('default',
150 ['clean', 171 ['clean',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 "name": "videojs-contrib-hls", 2 "name": "videojs-contrib-hls",
3 "version": "0.3.0", 3 "version": "0.3.0",
4 "engines": { 4 "engines": {
5 "node": ">= 0.8.0" 5 "node": ">= 0.10.12"
6 }, 6 },
7 "repository": { 7 "repository": {
8 "type": "git", 8 "type": "git",
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
20 "grunt-contrib-watch": "~0.4.0", 20 "grunt-contrib-watch": "~0.4.0",
21 "grunt-contrib-clean": "~0.4.0", 21 "grunt-contrib-clean": "~0.4.0",
22 "grunt-contrib-connect": "~0.6.0", 22 "grunt-contrib-connect": "~0.6.0",
23 "grunt-concurrent": "0.4.3",
24 "grunt-open": "0.2.3",
25 "grunt-shell": "0.6.1",
23 "grunt": "~0.4.1" 26 "grunt": "~0.4.1"
24 }, 27 },
25 "dependencies": { 28 "dependencies": {
......