From 8ba99648af42c2442bc5c484f87ed57f2ea0df20 Mon Sep 17 00:00:00 2001 From: Wikiki Date: Sat, 10 Feb 2018 12:14:25 +0100 Subject: [PATCH] fix(gulp): Use UMD modules style --- gulpfile.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index a65da50..b55404e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -30,12 +30,12 @@ var paths = { bulma: 'node_modules/bulma/sass/utilities/', jsPattern: '**/*.js' } -var globalSassFile = package.name + '.sass'; -var globalJsFile = package.name + '.sass'; var bulmaSassFile = '_all.sass'; +var globalSassFile = package.name + '.sass'; +var globalJsFile = package.name + '.js'; var mainSassFile = 'extension.sass'; -var distCssFile = package.name + '.min.css'; var mainJsFile = 'extension.js'; +var distCssFile = package.name + '.min.css'; var distJsFile = package.name + '.min.js'; /** @@ -89,6 +89,7 @@ gulp.task('build:scripts', ['build:scripts:copy'], function() { .pipe(babel({ "presets": [ ["@babel/preset-env", { + "modules": "umd", "targets": { "browsers": ["last 2 versions"] } @@ -114,8 +115,11 @@ gulp.task('clean:scripts', function(callback) { callback(); }); -// Deletes the entire _site directory. -gulp.task('clean', ['clean:scripts', 'clean:styles']); +// Deletes the entire dist directory. +gulp.task('clean', ['clean:scripts', 'clean:styles'], function(callback) { + del(paths.dest); + callback(); +}); /** * ----------------------------------------