Commit e5842581 authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

Updated gulp file to stop using deprecated features. The versions are locked

parent 35a86a62
Pipeline #8101 passed with stage
in 1 minute and 6 seconds
...@@ -2,7 +2,8 @@ var gulp = require('gulp'), ...@@ -2,7 +2,8 @@ var gulp = require('gulp'),
gulp_uglify = require('gulp-uglify'), gulp_uglify = require('gulp-uglify'),
gulp_clean_css = require('gulp-clean-css'), gulp_clean_css = require('gulp-clean-css'),
gulp_concat = require('gulp-concat'), gulp_concat = require('gulp-concat'),
gulp_inject = require('gulp-inject'); gulp_inject = require('gulp-inject'),
merge_stream = require('merge-stream');
var css_path = 'src/*.css', var css_path = 'src/*.css',
js_path = 'src/*.js', js_path = 'src/*.js',
...@@ -34,7 +35,7 @@ gulp.task('js', function() { ...@@ -34,7 +35,7 @@ gulp.task('js', function() {
.pipe(gulp.dest('static')); .pipe(gulp.dest('static'));
}); });
gulp.task('templates', ['css', 'js', 'png', 'svg'], function() { gulp.task('templates', function() {
return gulp.src(template_path) return gulp.src(template_path)
.pipe(gulp_inject(gulp.src('static/*.js', {read:false}), { .pipe(gulp_inject(gulp.src('static/*.js', {read:false}), {
transform: function(filepath) { transform: function(filepath) {
...@@ -51,12 +52,7 @@ gulp.task('templates', ['css', 'js', 'png', 'svg'], function() { ...@@ -51,12 +52,7 @@ gulp.task('templates', ['css', 'js', 'png', 'svg'], function() {
.pipe(gulp.dest('templates')); .pipe(gulp.dest('templates'));
}); });
gulp.task('watch', function() { gulp.task('default', gulp.series(
gulp.watch(css_path, ['css']); gulp.parallel('css', 'js', 'png', 'svg'),
gulp.watch(js_path , ['js']); 'templates'
gulp.watch(png_path , ['png']); ));
gulp.watch(png_path , ['svg']); \ No newline at end of file
gulp.watch(template_path, ['templates']);
});
gulp.task('default', ['png', 'svg', 'css', 'js', 'templates']);
\ No newline at end of file
{ {
"devDependencies": { "devDependencies": {
"gulp": "3.9.1", "gulp": "4.0.0",
"gulp-uglify": "latest", "gulp-uglify": "3.0.1",
"gulp-concat": "latest", "gulp-concat": "2.6.1",
"gulp-clean-css": "latest", "gulp-clean-css": "4.0.0",
"gulp-inject": "latest" "gulp-inject": "5.0.2",
} "merge-stream": "^1.0.1"
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment