mirror of
https://github.com/bitwarden/server.git
synced 2025-01-22 21:51:22 +01:00
update gulp to v4 and remove old packages (#774)
* update gulp to v4 and remove old packages * desc * update project name
This commit is contained in:
parent
d2625e47e1
commit
f695b1e7fc
@ -1,14 +1,10 @@
|
||||
/// <binding BeforeBuild='build' Clean='clean' ProjectOpened='build' />
|
||||
|
||||
const gulp = require('gulp'),
|
||||
rimraf = require('rimraf'),
|
||||
merge = require('merge-stream'),
|
||||
runSequence = require('run-sequence'),
|
||||
googleWebFonts = require('gulp-google-webfonts'),
|
||||
concat = require('gulp-concat'),
|
||||
cssmin = require('gulp-cssmin'),
|
||||
uglify = require('gulp-uglify'),
|
||||
sass = require('gulp-sass');
|
||||
const gulp = require('gulp');
|
||||
const merge = require('merge-stream');
|
||||
const googleWebFonts = require('gulp-google-webfonts');
|
||||
const sass = require('gulp-sass');
|
||||
const del = require('del');
|
||||
|
||||
const paths = {};
|
||||
paths.webroot = './wwwroot/';
|
||||
@ -25,21 +21,11 @@ paths.minJs = paths.jsDir + '**/*.min.js';
|
||||
paths.libJs = paths.libDir + '**/*.js';
|
||||
paths.libMinJs = paths.libDir + '**/*.min.js';
|
||||
|
||||
gulp.task('clean:js', (cb) => {
|
||||
rimraf(paths.minJs, cb);
|
||||
});
|
||||
function clean() {
|
||||
return del([paths.minJs, paths.cssDir, paths.libDir]);
|
||||
}
|
||||
|
||||
gulp.task('clean:css', (cb) => {
|
||||
rimraf(paths.cssDir, cb);
|
||||
});
|
||||
|
||||
gulp.task('clean:lib', (cb) => {
|
||||
rimraf(paths.libDir, cb);
|
||||
});
|
||||
|
||||
gulp.task('clean', ['clean:js', 'clean:css', 'clean:lib']);
|
||||
|
||||
gulp.task('lib', ['clean:lib'], () => {
|
||||
function lib() {
|
||||
const libs = [
|
||||
{
|
||||
src: paths.npmDir + 'bootstrap/dist/js/*',
|
||||
@ -67,27 +53,30 @@ gulp.task('lib', ['clean:lib'], () => {
|
||||
return gulp.src(lib.src).pipe(gulp.dest(lib.dest));
|
||||
});
|
||||
return merge(tasks);
|
||||
});
|
||||
}
|
||||
|
||||
gulp.task('sass', () => {
|
||||
function runSass() {
|
||||
return gulp.src(paths.sass)
|
||||
.pipe(sass({ outputStyle: 'compressed' }).on('error', sass.logError))
|
||||
.pipe(gulp.dest(paths.cssDir));
|
||||
});
|
||||
}
|
||||
|
||||
gulp.task('sass:watch', () => {
|
||||
gulp.watch(paths.sass, ['sass']);
|
||||
});
|
||||
function sassWatch() {
|
||||
gulp.watch(paths.sass, runSass);
|
||||
}
|
||||
|
||||
gulp.task('webfonts', () => {
|
||||
function webfonts() {
|
||||
return gulp.src('./webfonts.list')
|
||||
.pipe(googleWebFonts({
|
||||
fontsDir: 'webfonts',
|
||||
cssFilename: 'webfonts.css'
|
||||
}))
|
||||
.pipe(gulp.dest(paths.cssDir));
|
||||
});
|
||||
}
|
||||
|
||||
gulp.task('build', function (cb) {
|
||||
return runSequence('clean', ['lib', 'sass', 'webfonts'], cb);
|
||||
});
|
||||
exports.build = gulp.series(clean, gulp.parallel([lib, runSass, webfonts]));
|
||||
exports['sass:watch'] = sassWatch;
|
||||
exports.sass = runSass;
|
||||
exports.lib = lib;
|
||||
exports.webfonts = webfonts;
|
||||
exports.clean = clean;
|
||||
|
2970
src/Admin/package-lock.json
generated
2970
src/Admin/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,20 +1,18 @@
|
||||
{
|
||||
"name": "bitwarden",
|
||||
"name": "bitwarden-admin",
|
||||
"version": "0.0.0",
|
||||
"description": "Bitwarden System Admin Portal",
|
||||
"repository": "https://github.com/bitwarden/server",
|
||||
"license": "GPL-3.0",
|
||||
"devDependencies": {
|
||||
"bootstrap": "4.5.0",
|
||||
"del": "5.1.0",
|
||||
"font-awesome": "4.7.0",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-concat": "2.6.1",
|
||||
"gulp-cssmin": "0.2.0",
|
||||
"gulp": "4.0.2",
|
||||
"gulp-google-webfonts": "2.0.0",
|
||||
"gulp-sass": "4.0.1",
|
||||
"gulp-uglify": "3.0.0",
|
||||
"jquery": "3.4.1",
|
||||
"jquery": "3.5.1",
|
||||
"merge-stream": "1.0.1",
|
||||
"natives": "1.1.6",
|
||||
"popper.js": "1.14.4",
|
||||
"rimraf": "2.6.2",
|
||||
"run-sequence": "2.2.1"
|
||||
"popper.js": "1.16.1"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user