1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-21 04:55:08 -05: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:
Kyle Spearrin 2020-06-11 14:23:23 -04:00 committed by GitHub
parent d2625e47e1
commit f695b1e7fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1811 additions and 1234 deletions

View File

@ -1,14 +1,10 @@
/// <binding BeforeBuild='build' Clean='clean' ProjectOpened='build' /> /// <binding BeforeBuild='build' Clean='clean' ProjectOpened='build' />
const gulp = require('gulp'), const gulp = require('gulp');
rimraf = require('rimraf'), const merge = require('merge-stream');
merge = require('merge-stream'), const googleWebFonts = require('gulp-google-webfonts');
runSequence = require('run-sequence'), const sass = require('gulp-sass');
googleWebFonts = require('gulp-google-webfonts'), const del = require('del');
concat = require('gulp-concat'),
cssmin = require('gulp-cssmin'),
uglify = require('gulp-uglify'),
sass = require('gulp-sass');
const paths = {}; const paths = {};
paths.webroot = './wwwroot/'; paths.webroot = './wwwroot/';
@ -25,21 +21,11 @@ paths.minJs = paths.jsDir + '**/*.min.js';
paths.libJs = paths.libDir + '**/*.js'; paths.libJs = paths.libDir + '**/*.js';
paths.libMinJs = paths.libDir + '**/*.min.js'; paths.libMinJs = paths.libDir + '**/*.min.js';
gulp.task('clean:js', (cb) => { function clean() {
rimraf(paths.minJs, cb); return del([paths.minJs, paths.cssDir, paths.libDir]);
}); }
gulp.task('clean:css', (cb) => { function lib() {
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'], () => {
const libs = [ const libs = [
{ {
src: paths.npmDir + 'bootstrap/dist/js/*', 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 gulp.src(lib.src).pipe(gulp.dest(lib.dest));
}); });
return merge(tasks); return merge(tasks);
}); }
gulp.task('sass', () => { function runSass() {
return gulp.src(paths.sass) return gulp.src(paths.sass)
.pipe(sass({ outputStyle: 'compressed' }).on('error', sass.logError)) .pipe(sass({ outputStyle: 'compressed' }).on('error', sass.logError))
.pipe(gulp.dest(paths.cssDir)); .pipe(gulp.dest(paths.cssDir));
}); }
gulp.task('sass:watch', () => { function sassWatch() {
gulp.watch(paths.sass, ['sass']); gulp.watch(paths.sass, runSass);
}); }
gulp.task('webfonts', () => { function webfonts() {
return gulp.src('./webfonts.list') return gulp.src('./webfonts.list')
.pipe(googleWebFonts({ .pipe(googleWebFonts({
fontsDir: 'webfonts', fontsDir: 'webfonts',
cssFilename: 'webfonts.css' cssFilename: 'webfonts.css'
})) }))
.pipe(gulp.dest(paths.cssDir)); .pipe(gulp.dest(paths.cssDir));
}); }
gulp.task('build', function (cb) { exports.build = gulp.series(clean, gulp.parallel([lib, runSass, webfonts]));
return runSequence('clean', ['lib', 'sass', 'webfonts'], cb); exports['sass:watch'] = sassWatch;
}); exports.sass = runSass;
exports.lib = lib;
exports.webfonts = webfonts;
exports.clean = clean;

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +1,18 @@
{ {
"name": "bitwarden", "name": "bitwarden-admin",
"version": "0.0.0", "version": "0.0.0",
"description": "Bitwarden System Admin Portal",
"repository": "https://github.com/bitwarden/server",
"license": "GPL-3.0",
"devDependencies": { "devDependencies": {
"bootstrap": "4.5.0", "bootstrap": "4.5.0",
"del": "5.1.0",
"font-awesome": "4.7.0", "font-awesome": "4.7.0",
"gulp": "3.9.1", "gulp": "4.0.2",
"gulp-concat": "2.6.1",
"gulp-cssmin": "0.2.0",
"gulp-google-webfonts": "2.0.0", "gulp-google-webfonts": "2.0.0",
"gulp-sass": "4.0.1", "gulp-sass": "4.0.1",
"gulp-uglify": "3.0.0", "jquery": "3.5.1",
"jquery": "3.4.1",
"merge-stream": "1.0.1", "merge-stream": "1.0.1",
"natives": "1.1.6", "popper.js": "1.16.1"
"popper.js": "1.14.4",
"rimraf": "2.6.2",
"run-sequence": "2.2.1"
} }
} }