Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianSW committed Aug 2, 2022
1 parent f58c186 commit 9290870
Show file tree
Hide file tree
Showing 11 changed files with 4,277 additions and 4,601 deletions.
37 changes: 21 additions & 16 deletions gulpfile.js → gulpfile.mjs
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
const {series, dest, src} = require('gulp');
const uglify = require('gulp-uglify');
const del = require('del');
const sass = require('gulp-sass')(require('sass'));
const ts = require("gulp-typescript");
const through = require("through2");
const path = require("path");
import {deleteSync} from 'del';
import gulp from 'gulp';
import uglify from 'gulp-uglify';
import sassCompiler from 'sass';
import gulpSass from 'gulp-sass';
import ts from 'gulp-typescript';
import through from 'through2';
import path from 'path';

const {series, dest, src} = gulp;

const sass = gulpSass(sassCompiler);
const tsProject = ts.createProject("tsconfig.json");

function clean() {
return del('dist/**', {force: true});
async function clean() {
return deleteSync('dist/**', {force: true});
}

function assets() {
async function assets() {
return src('src/assets/**/*')
.pipe(dest('dist/assets/'));
}

function themes() {
async function themes() {
return src('themes/**/*.ejs')
.pipe(dest('dist/themes/'));
}

function themeScripts() {
async function themeScripts() {
return src('themes/**/*.js')
.pipe(uglify())
.pipe(dest('dist/assets/js/'));
}

function themeCss() {
async function themeCss() {
return src('themes/**/*.scss')
.pipe(sass({outputStyle: 'compressed'}))
.pipe(dest('dist/assets/css/'));
}

function themeAssets() {
async function themeAssets() {
return src('themes/*/images/**/*')
.pipe(removeDuplicateImagesPath())
.pipe(dest('dist/assets/images/'));
Expand All @@ -46,10 +51,10 @@ function removeDuplicateImagesPath() {
});
}

function tsc() {
async function tsc() {
return tsProject.src()
.pipe(tsProject())
.js.pipe(dest("dist"));
}

exports.default = series(clean, tsc, themes, assets, themeScripts, themeCss, themeAssets);
export default series(clean, tsc, themes, assets, themeScripts, themeCss, themeAssets);
Loading

0 comments on commit 9290870

Please sign in to comment.