mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-27 15:39:54 +03:00
[feat #49] Add creation date to taglist
This commit is contained in:
parent
5173110883
commit
4cb79a670f
6 changed files with 104 additions and 37 deletions
39
gulpfile.js
39
gulpfile.js
|
@ -3,9 +3,10 @@ const cleanCSS = require('gulp-clean-css');
|
|||
const concat = require('gulp-concat');
|
||||
const del = require('del');
|
||||
const filter = require('gulp-filter');
|
||||
const fs = require('fs');
|
||||
const gIf = require('gulp-if');
|
||||
const gulp = require('gulp');
|
||||
const parallel = gulp.parallel;
|
||||
const series = gulp.series;
|
||||
const htmlmin = require('gulp-htmlmin');
|
||||
const license = require('gulp-license');
|
||||
const riot = require('gulp-riot');
|
||||
|
@ -37,7 +38,7 @@ const staticScripts = [
|
|||
'src/scripts/static.js'
|
||||
];
|
||||
|
||||
gulp.task('html', function() {
|
||||
function html() {
|
||||
var htmlFilter = filter('**/*.html', {restore: true});
|
||||
return gulp.src(['src/index.html'])
|
||||
.pipe(useref())
|
||||
|
@ -52,13 +53,13 @@ gulp.task('html', function() {
|
|||
}))
|
||||
.pipe(htmlFilter.restore)
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task('clean', function(done) {
|
||||
function clean() {
|
||||
return del(['dist']);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task('docker-registry-ui-static', ['html'], function() {
|
||||
function appStatic() {
|
||||
return merge(gulp.src(staticScripts), gulp.src(staticTags).pipe(riot()))
|
||||
.pipe(concat('docker-registry-ui-static.js'))
|
||||
.pipe(minifier())
|
||||
|
@ -70,9 +71,9 @@ gulp.task('docker-registry-ui-static', ['html'], function() {
|
|||
}))
|
||||
.pipe(injectVersion())
|
||||
.pipe(gulp.dest('dist/scripts'));
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task('docker-registry-ui', ['html'], function() {
|
||||
function app() {
|
||||
return merge(gulp.src(allScripts), gulp.src(allTags).pipe(riot()))
|
||||
.pipe(concat('docker-registry-ui.js'))
|
||||
.pipe(minifier())
|
||||
|
@ -84,15 +85,15 @@ gulp.task('docker-registry-ui', ['html'], function() {
|
|||
}))
|
||||
.pipe(injectVersion())
|
||||
.pipe(gulp.dest('dist/scripts'));
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task('vendor', ['html'], function() {
|
||||
function vendor() {
|
||||
return gulp.src(['node_modules/riot/riot.min.js', 'node_modules/riot-route/dist/route.min.js', 'node_modules/riot-mui/build/js/riot-mui-min.js'])
|
||||
.pipe(concat('vendor.js'))
|
||||
.pipe(gulp.dest('dist/scripts'));
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task('styles', ['html'], function() {
|
||||
function styles() {
|
||||
return gulp.src(['src/*.css'])
|
||||
.pipe(concat('style.css'))
|
||||
.pipe(cleanCSS({
|
||||
|
@ -105,18 +106,12 @@ gulp.task('styles', ['html'], function() {
|
|||
organization: 'Jones Magloire @Joxit'
|
||||
}))
|
||||
.pipe(gulp.dest('dist/'));
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task('fonts', function() {
|
||||
function fonts() {
|
||||
return gulp.src('src/fonts/*')
|
||||
.pipe(filter('**/*.{otf,eot,svg,ttf,woff,woff2}'))
|
||||
.pipe(gulp.dest('dist/fonts'));
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task('sources', ['docker-registry-ui', 'vendor', 'docker-registry-ui-static', 'styles'], function() {
|
||||
gulp.start();
|
||||
});
|
||||
|
||||
gulp.task('build', ['clean'], function() {
|
||||
gulp.start(['sources', 'fonts']);
|
||||
});
|
||||
exports.build = series(clean, html, parallel(fonts, styles, vendor, app, appStatic));
|
Loading…
Add table
Add a link
Reference in a new issue