Skip to content

Commit

Permalink
Fixed merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rafa8626 committed Feb 17, 2017
2 parents 503e33f + 1dc370a commit f9918de
Show file tree
Hide file tree
Showing 42 changed files with 1,762 additions and 1,751 deletions.
19 changes: 19 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"env": {
"es6": true,
"browser": true,
"mocha": true,
"node": true,
"jquery": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"rules": {
"no-console": 0,
"no-undef" : 0,
"no-case-declarations": 0
}
}
15 changes: 0 additions & 15 deletions .jshintrc

This file was deleted.

115 changes: 56 additions & 59 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = function(grunt) {
module.exports = function (grunt) {

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
Expand All @@ -10,6 +10,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks("grunt-remove-logging");
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-eslint');


var rendererSources;

Expand All @@ -18,7 +20,7 @@ module.exports = function(grunt) {
if (rendererList) {
rendererList = rendererList.split(',');
rendererSources = [];
rendererList.forEach(function(renderer) {
rendererList.forEach(function (renderer) {
var path = 'src/js/renderers/' + renderer + '.js';
if (grunt.file.isFile(path)) {
rendererSources.push(path);
Expand All @@ -28,24 +30,19 @@ module.exports = function(grunt) {

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
options: {
jshintrc: '.jshintrc'
},
files: {
src: [
'Gruntfile.js',
'src/js/core/*.js',
'src/js/features/*.js',
'src/js/languages/*.js',
'src/js/renderers/*.js',
'src/js/utils/*.js',
'src/js/library.js',
'src/js/player.js',
'src/js/index.js',
'test/core/*.js'
]
}
eslint: {
target: [
'Gruntfile.js',
'src/js/core/*.js',
'src/js/features/*.js',
'src/js/languages/*.js',
'src/js/renderers/*.js',
'src/js/utils/*.js',
'src/js/library.js',
'src/js/player.js',
'src/js/index.js',
'test/core/*.js'
]
},
browserify: {
dist: {
Expand All @@ -60,15 +57,15 @@ module.exports = function(grunt) {
'src/js/renderers/vr.js',
'src/js/renderers/flash.js'
].concat(rendererSources || [
'src/js/renderers/dailymotion.js',
'src/js/renderers/dash.js',
'src/js/renderers/facebook.js',
'src/js/renderers/flv.js',
'src/js/renderers/hls.js',
'src/js/renderers/soundcloud.js',
'src/js/renderers/vimeo.js',
'src/js/renderers/youtube.js',
]),
'src/js/renderers/dailymotion.js',
'src/js/renderers/dash.js',
'src/js/renderers/facebook.js',
'src/js/renderers/flv.js',
'src/js/renderers/hls.js',
'src/js/renderers/soundcloud.js',
'src/js/renderers/vimeo.js',
'src/js/renderers/youtube.js',
]),
// just player
'build/mediaelementplayer.js': [
'src/js/utils/polyfill.js',
Expand Down Expand Up @@ -97,15 +94,15 @@ module.exports = function(grunt) {
'src/js/renderers/vr.js',
'src/js/renderers/flash.js'
].concat(rendererSources || [
'src/js/renderers/dailymotion.js',
'src/js/renderers/dash.js',
'src/js/renderers/facebook.js',
'src/js/renderers/flv.js',
'src/js/renderers/hls.js',
'src/js/renderers/soundcloud.js',
'src/js/renderers/vimeo.js',
'src/js/renderers/youtube.js',
]).concat([
'src/js/renderers/dailymotion.js',
'src/js/renderers/dash.js',
'src/js/renderers/facebook.js',
'src/js/renderers/flv.js',
'src/js/renderers/hls.js',
'src/js/renderers/soundcloud.js',
'src/js/renderers/vimeo.js',
'src/js/renderers/youtube.js',
]).concat([
'src/js/library.js',
'src/js/player.js',
'src/js/features/fullscreen.js',
Expand Down Expand Up @@ -186,7 +183,7 @@ module.exports = function(grunt) {
processors: [
// Add vendor prefixes.
require('autoprefixer')({browsers: 'last 2 versions, ie > 8'}),
// Minify the result.
// Minify the result.
require('cssnano')()
]
},
Expand All @@ -201,20 +198,20 @@ module.exports = function(grunt) {
},
copy: {
build: {
expand : true,
cwd : 'src/css/',
src : ['*.png', '*.svg', '*.gif', '*.css'],
dest : 'build/',
flatten : true,
filter : 'isFile'
expand: true,
cwd: 'src/css/',
src: ['*.png', '*.svg', '*.gif', '*.css'],
dest: 'build/',
flatten: true,
filter: 'isFile'
},
translation: {
expand : true,
cwd : 'src/js/languages/',
src : ['*.js', '!*en.js'],
dest : 'build/lang/',
flatten : true,
filter : 'isFile',
expand: true,
cwd: 'src/js/languages/',
src: ['*.js', '!*en.js'],
dest: 'build/lang/',
flatten: true,
filter: 'isFile',
options: {
processContent: function (content) {
content = content.replace(/\/\/.*?\.js/gm, '');
Expand All @@ -225,7 +222,7 @@ module.exports = function(grunt) {
},
clean: {
build: ['build'],
temp: ['tmp']
temp: ['tmp']
},

// Task that compiles all SWF files using the free Flex SDK on Linux/Mac.
Expand Down Expand Up @@ -254,7 +251,7 @@ module.exports = function(grunt) {

shell: {
buildFlashVideo: {
command: function() {
command: function () {
grunt.config.set("sourceFile", 'src/flash/flash-video/VideoMediaElement.as');
grunt.config.set("sourcePath", 'src/flash/flash-video');
grunt.config.set("flashOut", 'build/mediaelement-flash-video.swf');
Expand All @@ -263,7 +260,7 @@ module.exports = function(grunt) {
}
},
buildFlashVideoHls: {
command: function() {
command: function () {
grunt.config.set("sourceFile", 'src/flash/flash-video-hls/HlsMediaElement.as');
grunt.config.set("sourcePath", 'src/flash/flash-video-hls');
grunt.config.set("flashOut", 'build/mediaelement-flash-video-hls.swf');
Expand All @@ -272,7 +269,7 @@ module.exports = function(grunt) {
}
},
buildFlashVideoMDash: {
command: function() {
command: function () {
grunt.config.set("sourceFile", 'src/flash/flash-video-dash/DashMediaElement.as');
grunt.config.set("sourcePath", 'src/flash/flash-video-dash');
grunt.config.set("flashOut", 'build/mediaelement-flash-video-mdash.swf');
Expand All @@ -281,7 +278,7 @@ module.exports = function(grunt) {
}
},
buildFlashAudio: {
command: function() {
command: function () {
grunt.config.set("sourceFile", 'src/flash/flash-audio/AudioMediaElement.as');
grunt.config.set("sourcePath", 'src/flash/flash-audio');
grunt.config.set("flashOut", 'build/mediaelement-flash-audio.swf');
Expand All @@ -290,7 +287,7 @@ module.exports = function(grunt) {
}
},
buildFlashAudioOgg: {
command: function() {
command: function () {
grunt.config.set("sourceFile", 'src/flash/flash-audio-ogg/OggMediaElement.as');
grunt.config.set("sourcePath", 'src/flash/flash-audio-ogg');
grunt.config.set("flashOut", 'build/mediaelement-flash-audio-ogg.swf');
Expand All @@ -301,7 +298,7 @@ module.exports = function(grunt) {
}
});

grunt.registerTask('default', ['jshint', 'browserify', 'concat', 'removelogging', 'uglify', 'postcss', 'copy', 'clean:temp']);
grunt.registerTask('debug', ['jshint', 'browserify', 'concat', 'uglify', 'postcss', 'copy', 'clean:temp']);
grunt.registerTask('default', ['eslint', 'browserify', 'concat', 'removelogging', 'uglify', 'postcss', 'copy', 'clean:temp']);
grunt.registerTask('debug', ['eslint', 'browserify', 'concat', 'uglify', 'postcss', 'copy', 'clean:temp']);
grunt.registerTask('flash', ['shell']);
};
Loading

0 comments on commit f9918de

Please sign in to comment.