1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-04 10:34:51 +02:00

Added watchify task

This commit is contained in:
eXon 2015-04-23 06:43:50 -04:00
parent a02ee27802
commit 65dddf7a0b
2 changed files with 30 additions and 0 deletions

View File

@ -277,6 +277,34 @@ module.exports = function(grunt) {
}
}
},
watchify: {
options: {
debug: true,
standalone: 'videojs',
keepalive: true,
callback: function(bundle) {
bundle.transform(require('babelify').configure({
sourceMapRelative: './src/js'
}));
bundle.transform('browserify-versionify', {
placeholder: '__VERSION__',
version: pkg.version
});
bundle.transform('browserify-versionify', {
placeholder: '__VERSION_NO_PATCH__',
version: version.majorMinor
});
return bundle;
}
},
build: {
src: ['./src/js/video.js'],
dest: './build/temp/video.js',
}
},
exorcise: {
build: {
options: {},
@ -320,6 +348,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-aws-s3');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-watchify');
grunt.loadNpmTasks('grunt-coveralls');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');

View File

@ -52,6 +52,7 @@
"grunt-karma": "^0.8.3",
"grunt-version": "~0.3.0",
"grunt-videojs-languages": "0.0.4",
"grunt-watchify": "^0.1.0",
"grunt-zip": "0.10.2",
"karma": "^0.12.14",
"karma-browserify": "^4.0.0",