Skip to content

Commit

Permalink
UMD loader, addded jquery extension init
Browse files Browse the repository at this point in the history
  • Loading branch information
prochor666 committed Dec 16, 2016
1 parent 512553e commit e8669db
Show file tree
Hide file tree
Showing 26 changed files with 5,514 additions and 1,612 deletions.
292 changes: 228 additions & 64 deletions dist/js/julia-player.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/js/julia-player.min.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions dist/js/lib/hls.min.js

Large diffs are not rendered by default.

32 changes: 23 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

/*
Julia player app builder
@TODO * source maps
*/

// Gulp && plugins
var gulp = require('gulp');
var cleanCSS = require('gulp-clean-css');
var sass = require('gulp-sass');
var cleanCss = require('gulp-clean-css');
var concat = require('gulp-concat');
var minify = require('gulp-minify');
var replace = require('gulp-replace');
var del = require('del');
var fs = require('fs');

// Sources
var appSrc = [
Expand All @@ -33,6 +35,10 @@ var appSrc = [
'src/js/julia-jquery-plugin.js',
];

var appUMD = [
'src/js/julia-umd.js',
];


// App styles
gulp.task('sass', function()
Expand All @@ -50,6 +56,17 @@ gulp.task('sass', function()
gulp.task('jsbuild', function()
{
return gulp.src(appSrc)
.pipe(concat('julia-plugin-build.js'))
.pipe(gulp.dest('plugin'));
});


gulp.task('finalbuild', function()
{
var pluginContent = fs.readFileSync('plugin/julia-plugin-build.js', 'utf8');

return gulp.src(appUMD)
.pipe(replace('//--JULIA-PLAYER-SOURCE--', pluginContent))
.pipe(concat('julia-player.js'))
.pipe(minify({
ext:{
Expand All @@ -58,18 +75,15 @@ gulp.task('jsbuild', function()
},
compress: {
properties: false
},
exclude: ['tmp'],
ignoreFiles: ['.combo.js', '.min.js']
}))
.pipe(gulp.dest('dist/js'));
});

}
})).pipe(gulp.dest('dist/js'));
})


// Watch it, Gulp!
gulp.task('watch', function ()
{
gulp.watch('src/scss/*.scss', ['sass']);
gulp.watch('src/js/*.js', ['jsbuild']);
gulp.watch('plugin/julia-plugin-build.js', ['finalbuild']);
});
Loading

0 comments on commit e8669db

Please sign in to comment.