From 3da3f5ae59c13d9fe2c6f6b00e533e416fec5bf6 Mon Sep 17 00:00:00 2001 From: bre1470 <40056287+bre1470@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:44:05 +0100 Subject: [PATCH] Tools: Fixed dist compiling scripts. --- tools/gulptasks/dist-release.js | 10 ++++++++-- tools/gulptasks/dist.js | 11 ++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/tools/gulptasks/dist-release.js b/tools/gulptasks/dist-release.js index 9566b5c0c2a..30897ca2bea 100644 --- a/tools/gulptasks/dist-release.js +++ b/tools/gulptasks/dist-release.js @@ -7,7 +7,7 @@ const gulp = require('gulp'); const log = require('../libs/log'); const fs = require('fs-extra'); // const fs = require('fs'); -// const libFS = require('../libs/fs'); +// const fsLib = require('../libs/fs'); const { join } = require('path'); const readline = require('readline'); const argv = require('yargs').argv; @@ -141,7 +141,7 @@ function updateJSONFiles(version, name) { const json = JSON.parse(fileData); json.types = ( json.main ? - json.main.replace(/\.js$/, '.d.ts') : + json.main.replace(/\.js$/u, '.d.ts') : 'highcharts.d.ts' ); json.version = version; @@ -304,6 +304,12 @@ function checkIfLoggedInOnNpm() { async function release() { const products = await getProductsJs(); const version = products[PRODUCT_NAME].nr; + + if (!fs.existsSync('code/highcharts.js')) { + log.starting('Compiling one more time.'); + await gulp.series('scripts', 'scripts-compile'); + } + log.starting(`Initiating release of ${PRODUCT_NAME} version ${version}.`); if (argv.push) { diff --git a/tools/gulptasks/dist.js b/tools/gulptasks/dist.js index 28096bac6b4..278dad6c683 100644 --- a/tools/gulptasks/dist.js +++ b/tools/gulptasks/dist.js @@ -29,11 +29,7 @@ Gulp.task( Gulp.series( 'lint-ts', 'scripts-clean', - 'scripts-css', - 'scripts-ts', - 'scripts-js', - 'scripts-code', - 'scripts-es5', + 'scripts', 'scripts-compile', 'dist-clean', 'dist-copy', @@ -47,10 +43,7 @@ Gulp.task( Gulp.series( 'lint-ts', 'scripts-clean', - 'scripts-css', - 'scripts-ts', - 'scripts-code', - 'scripts-webpack', + 'scripts', 'scripts-compile', 'dist-clean', 'dist-copy',