Skip to content

Commit

Permalink
gulp had vulnrable dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakeii committed Mar 23, 2018
1 parent 9c1f3fa commit 536342a
Show file tree
Hide file tree
Showing 5 changed files with 3,866 additions and 684 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "h5p-standalone",
"version": "1.3.0",
"version": "1.3.1",
"homepage": "https://github.com/tunapanda/h5p-standalone",
"authors": [
"Jake Lee Kennedy <[email protected]>"
Expand Down
4 changes: 2 additions & 2 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<head>
<link type="text/css" rel="stylesheet" media="all" href="../dist/styles/h5p.css" />
<meta charset="utf-8" />
<script type="text/javascript" src="../dist/js/h5p-standalone-main.js"></script>
<script type="text/javascript" src="../dist/js/h5p-standalone-main.min.js"></script>

<script type="text/javascript">
(function($) {
$(function() {
$('.h5p-container').h5p({
frameJs: '../dist/js/h5p-standalone-frame.js',
frameJs: '../dist/js/h5p-standalone-frame.min.js',
frameCss: '../dist/styles/h5p.css',
h5pContent: '../workspace'
});
Expand Down
37 changes: 16 additions & 21 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,49 +32,50 @@ var frameFiles = [
'src/js/h5p-overwrite.js'
];

gulp.task('clean-dist', function () {
function clean_dist () {
return gulp.src('dist/*', {read: false})
.pipe(clean());
});
};


gulp.task('compile-js', ['clean-dist'], function() {
function compile_js() {
return gulp.src('src/js/h5pintegration.es6')
.pipe(babel({
'presets': ['es2015']
}))
.pipe(gulp.dest('src/js'));
});
};

gulp.task('concat-main-js', ['compile-js'], function() {
function concat_main_js() {
return gulp.src(mainFiles)
.pipe(concat('h5p-standalone-main.js'))
.pipe(gulp.dest('dist/js'));
});
};

gulp.task('concat-frame-js', ['compile-js'], function() {
function concat_frame_js() {
return gulp.src(frameFiles)
.pipe(concat('h5p-standalone-frame.js'))
.pipe(gulp.dest('dist/js'));
});
};

gulp.task('minify-js', ['concat-main-js', 'concat-frame-js'], function() {
function minify_js() {
return gulp.src('dist/js/*.js')
.pipe(uglify())
.pipe(rename({
extname: '.min.js'
}))
.pipe(gulp.dest('dist/js'));
});
};

gulp.task('copy-css', ['clean-dist'], function() {
function copy_css() {
return gulp.src('bower_components/h5p-php-library/styles/*.css')
.pipe(gulp.dest('dist/styles'));
});
};

gulp.task('copy-fonts', ['clean-dist'], function() {
function copy_fonts() {
return gulp.src('bower_components/h5p-php-library/fonts/*')
.pipe(gulp.dest('dist/fonts'));
});
};

gulp.task('demo', function() {
gulp.src('./')
Expand All @@ -83,10 +84,4 @@ gulp.task('demo', function() {
}));
});

gulp.task('default', ['concat-main-js', 'concat-frame-js', 'copy-css', 'copy-fonts'], function() {

});

gulp.task('prod', ['default', 'minify-js'], function() {

});
gulp.task('default', gulp.series(clean_dist, gulp.parallel(gulp.series([compile_js, gulp.parallel(concat_main_js, concat_frame_js), minify_js]), copy_css, copy_fonts)));
Loading

0 comments on commit 536342a

Please sign in to comment.