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

Merge branch 'master' into 'release'

Master

See merge request elixir/elixir-beacon!4
parents 3812a0c8 cc1d3dea
Pipeline #12334 failed with stage
in 41 seconds
......@@ -14,7 +14,6 @@ test:
- pwd
- head tests/settings.json.ci
- cp tests/settings.json.ci ./local_settings.json
# Sometimes gulp mixes the order of tasks and does not generate templates, hence it's run twice below:
- cd beacon && yarn install && node node_modules/gulp/bin/gulp.js && node node_modules/gulp/bin/gulp.js && cd ../
- cd beacon && yarn install && node node_modules/gulp/bin/gulp.js && cd ../
- coverage run --source beacon setup.py test
- coverage report -m
\ No newline at end of file
......@@ -2,7 +2,8 @@ var gulp = require('gulp'),
gulp_uglify = require('gulp-uglify'),
gulp_clean_css = require('gulp-clean-css'),
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',
js_path = 'src/*.js',
......@@ -11,31 +12,31 @@ var css_path = 'src/*.css',
template_path = 'src/templates/*.html';
gulp.task('css', function() {
gulp.src(css_path)
return gulp.src(css_path)
.pipe(gulp_clean_css())
.pipe(gulp_concat('build.css'))
.pipe(gulp.dest('static'))
.pipe(gulp.dest('static'));
});
gulp.task('png', function() {
gulp.src(png_path)
.pipe(gulp.dest('static'))
return gulp.src(png_path)
.pipe(gulp.dest('static'));
});
gulp.task('svg', function() {
gulp.src(svg_path)
.pipe(gulp.dest('static'))
return gulp.src(svg_path)
.pipe(gulp.dest('static'));
});
gulp.task('js', function() {
gulp.src(js_path)
return gulp.src(js_path)
.pipe(gulp_uglify())
.pipe(gulp_concat('build.js'))
.pipe(gulp.dest('static'))
.pipe(gulp.dest('static'));
});
gulp.task('templates', ['css', 'js', 'png', 'svg'], function() {
gulp.src(template_path)
gulp.task('templates', function() {
return gulp.src(template_path)
.pipe(gulp_inject(gulp.src('static/*.js', {read:false}), {
transform: function(filepath) {
filepath = filepath.slice(filepath.lastIndexOf("/") + 1);
......@@ -48,15 +49,10 @@ gulp.task('templates', ['css', 'js', 'png', 'svg'], function() {
return "<link rel='stylesheet' href=\"{{ url_for('static', filename='" + filepath + "') }}\" />";
}
}))
.pipe(gulp.dest('templates'))
.pipe(gulp.dest('templates'));
});
gulp.task('watch', function() {
gulp.watch(css_path, ['css']);
gulp.watch(js_path , ['js']);
gulp.watch(png_path , ['png']);
gulp.watch(png_path , ['svg']);
gulp.watch(template_path, ['templates']);
});
gulp.task('default', ['png', 'svg', 'css', 'js', 'templates']);
\ No newline at end of file
gulp.task('default', gulp.series(
gulp.parallel('css', 'js', 'png', 'svg'),
'templates'
));
\ No newline at end of file
{
"devDependencies": {
"gulp": "3.9.1",
"gulp-uglify": "latest",
"gulp-concat": "latest",
"gulp-clean-css": "latest",
"gulp-inject": "latest"
}
"devDependencies": {
"gulp": "4.0.0",
"gulp-uglify": "3.0.1",
"gulp-concat": "2.6.1",
"gulp-clean-css": "4.0.0",
"gulp-inject": "5.0.2",
"merge-stream": "^1.0.1"
}
}
......@@ -24,7 +24,7 @@ def get_test_suite():
setup(
name='elixir_beacon',
version='1.3.7',
version='1.3.8',
description="ELIXIR Beacon",
author="Jacek Lebioda",
author_email='jacek.lebioda@uni.lu',
......
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