Skip to content

Commit

Permalink
Tools: Fixed dist compiling scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
bre1470 committed Nov 28, 2024
1 parent 794a21a commit 3da3f5a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 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

0 comments on commit 3da3f5a

Please sign in to comment.