From 55b0aaf95a1910088e5db6a3e2e1740dbe1f1999 Mon Sep 17 00:00:00 2001 From: Tomas Chmelevskij Date: Sun, 8 Oct 2023 20:24:07 +0300 Subject: [PATCH] feat: only use rollup output for build --- gulpfile.js | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 0925af6e4c2..095c6dc16dd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -97,9 +97,19 @@ function process_package_debug(done) { getGitRevision(done, processPackage, false); } -// dist_yarn MUST be done after dist_src - -const distCommon = gulp.series(dist_src, dist_less, dist_changelog, dist_yarn, dist_locale, dist_libraries, dist_resources, dist_rollup, gulp.series(cordova_dist())); +const distCommon = gulp.series( + dist_src, + dist_node_modules_css, + dist_less, + dist_changelog, + dist_locale, + dist_libraries, + dist_resources, + dist_rollup, + gulp.series( + cordova_dist(), + ), +); const distBuild = gulp.series(process_package_release, distCommon); @@ -344,6 +354,7 @@ function processPackage(done, gitRevision, isReleaseBuild) { function dist_src() { const distSources = [ './src/**/*', + '!./src/**/*.js', '!./src/css/dropdown-lists/LICENSE', '!./src/support/**', '!./src/**/*.less', @@ -354,12 +365,17 @@ function dist_src() { .pipe(gulp.dest(DIST_DIR)); } +function dist_node_modules_css() { + return gulp.src('./**/*.min.css') + .pipe(gulp.dest(DIST_DIR)); +} + function dist_less() { return gulp.src('./src/**/*.less') .pipe(sourcemaps.init()) .pipe(less()) .pipe(sourcemaps.write('.')) - .pipe(gulp.dest(`${DIST_DIR}`)); + .pipe(gulp.dest(DIST_DIR)); } function dist_changelog() { @@ -367,15 +383,6 @@ function dist_changelog() { .pipe(gulp.dest(`${DIST_DIR}tabs/`)); } -// This function relies on files from the dist_src function -function dist_yarn() { - return gulp.src([`${DIST_DIR}package.json`, `${DIST_DIR}yarn.lock`]) - .pipe(gulp.dest(DIST_DIR)) - .pipe(yarn({ - production: true, - })); -} - function dist_locale() { return gulp.src('./locales/**/*', { base: 'locales'}) .pipe(gulp.dest(`${DIST_DIR}locales`));