Skip to content

Commit

Permalink
Merge pull request highcharts#22249 from highcharts/tools/fix-compile…
Browse files Browse the repository at this point in the history
…d-bundles

Tools: Fixed compiled bundles
  • Loading branch information
TorsteinHonsi authored Nov 29, 2024
2 parents 6b204a7 + 3da3f5a commit 1d5b0e6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
10 changes: 8 additions & 2 deletions tools/gulptasks/dist-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
11 changes: 2 additions & 9 deletions tools/gulptasks/dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
10 changes: 6 additions & 4 deletions tools/gulptasks/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,16 @@ function task() {
shouldRun() ||
processLib.isRunning('scripts_incomplete')
) {
fsLib.deleteDirectory('code', true);

processLib.isRunning('scripts_incomplete', true, true);

fsLib.deleteDirectory('code', true);

gulp.series(
'scripts-ts',
'scripts-css',
argv.assembler ? 'scripts-js' : 'scripts-webpack'
'scripts-ts',
'scripts-es5',
argv.assembler ? 'scripts-js' : 'scripts-webpack',
'scripts-code'
)(
function (error) {

Expand Down

0 comments on commit 1d5b0e6

Please sign in to comment.