Compare commits

...

4 Commits

4 changed files with 24 additions and 5 deletions

View File

@ -1,5 +1,15 @@
# Changelog # Changelog
## 2024-07-22 - 2.1.84 - fix(cli)
Fixed transpilation order issue in tsfolders command
- Corrected the transpilation order so 'ts_shared' is processed before other folders in the 'tsfolders' CLI command.
## 2024-07-21 - 2.1.83 - fix(cli)
Ensure 'ts_shared' folder is compiled first if present
- Added logic to make sure the 'ts_shared' folder is compiled first when running 'tsfolders' command.
## 2024-06-24 - 2.1.82 - fix(core) ## 2024-06-24 - 2.1.82 - fix(core)
Minor improvements and optimizations in core TypeScript compiler integration. Minor improvements and optimizations in core TypeScript compiler integration.

View File

@ -1,6 +1,6 @@
{ {
"name": "@git.zone/tsbuild", "name": "@git.zone/tsbuild",
"version": "2.1.82", "version": "2.1.84",
"private": false, "private": false,
"description": "TypeScript nightly to easily make use of latest features", "description": "TypeScript nightly to easily make use of latest features",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@git.zone/tsbuild', name: '@git.zone/tsbuild',
version: '2.1.82', version: '2.1.84',
description: 'TypeScript nightly to easily make use of latest features' description: 'TypeScript nightly to easily make use of latest features'
} }

View File

@ -37,14 +37,23 @@ export const runCli = async () => {
*/ */
tsbuildCli.addCommand('tsfolders').subscribe(async (argvArg) => { tsbuildCli.addCommand('tsfolders').subscribe(async (argvArg) => {
const tsFolders = await plugins.smartfile.fs.listFolders(paths.cwd, /^ts/); const tsFolders = await plugins.smartfile.fs.listFolders(paths.cwd, /^ts/);
// lets make sure shared is always transpiled first
const indexShared = tsFolders.indexOf('ts_shared');
if (indexShared > -1) {
tsFolders.splice(indexShared, 1);
tsFolders.unshift('ts_shared');
}
// lets make sure interfaces are always transpiled first // lets make sure interfaces are always transpiled first
const index = tsFolders.indexOf('ts_interfaces'); const indexInterfaces = tsFolders.indexOf('ts_interfaces');
if (index > -1) { if (indexInterfaces > -1) {
tsFolders.splice(index, 1); tsFolders.splice(indexInterfaces, 1);
tsFolders.unshift('ts_interfaces'); tsFolders.unshift('ts_interfaces');
} }
const compilationCommandObject: { [key: string]: string } = {}; const compilationCommandObject: { [key: string]: string } = {};
console.log(`compiling in this order:`);
console.log(tsFolders);
for (const tsFolder of tsFolders) { for (const tsFolder of tsFolders) {
compilationCommandObject[`./${tsFolder}/**/*.ts`] = `./dist_${tsFolder}`; compilationCommandObject[`./${tsFolder}/**/*.ts`] = `./dist_${tsFolder}`;
} }