Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
59c3deb83a | |||
c76403a34c | |||
23b361f26a | |||
9f7d447bc7 | |||
8904bf9427 | |||
3c5a8282ab |
14
changelog.md
14
changelog.md
@ -1,5 +1,19 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2024-10-27 - 1.10.3 - fix(mod_format)
|
||||||
|
Reorder TypeScript formatting steps in mod_format module
|
||||||
|
|
||||||
|
- Moved TypeScript configuration formatting earlier in the sequence for better logical consistency.
|
||||||
|
|
||||||
|
## 2024-10-27 - 1.10.2 - fix(format)
|
||||||
|
Add logging for tsconfig.json formatting
|
||||||
|
|
||||||
|
- Added an info log message for tsconfig.json formatting in format.tsconfig.ts.
|
||||||
|
|
||||||
|
## 2024-10-27 - 1.10.1 - fix(format)
|
||||||
|
Fixed async issue in tsconfig module lookup and corrected property access
|
||||||
|
|
||||||
|
|
||||||
## 2024-10-27 - 1.10.0 - feat(mod_format)
|
## 2024-10-27 - 1.10.0 - feat(mod_format)
|
||||||
Add support for tsconfig.json formatting
|
Add support for tsconfig.json formatting
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@git.zone/cli",
|
"name": "@git.zone/cli",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.10.0",
|
"version": "1.10.3",
|
||||||
"description": "A CLI toolbelt to streamline local development cycles by using various gitzone utilities.",
|
"description": "A CLI toolbelt to streamline local development cycles by using various gitzone utilities.",
|
||||||
"main": "dist_ts/index.ts",
|
"main": "dist_ts/index.ts",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@git.zone/cli',
|
name: '@git.zone/cli',
|
||||||
version: '1.10.0',
|
version: '1.10.3',
|
||||||
description: 'A CLI toolbelt to streamline local development cycles by using various gitzone utilities.'
|
description: 'A CLI toolbelt to streamline local development cycles by using various gitzone utilities.'
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import { Project } from '../classes.project.js';
|
|||||||
|
|
||||||
export const run = async (projectArg: Project) => {
|
export const run = async (projectArg: Project) => {
|
||||||
// lets care about tsconfig.json
|
// lets care about tsconfig.json
|
||||||
|
logger.log('info', 'Formatting tsconfig.json...');
|
||||||
const tsconfigSmartfile = await plugins.smartfile.SmartFile.fromFilePath(plugins.path.join(paths.cwd, 'tsconfig.json'));
|
const tsconfigSmartfile = await plugins.smartfile.SmartFile.fromFilePath(plugins.path.join(paths.cwd, 'tsconfig.json'));
|
||||||
const tsconfigObject = JSON.parse(tsconfigSmartfile.contentBuffer.toString());
|
const tsconfigObject = JSON.parse(tsconfigSmartfile.contentBuffer.toString());
|
||||||
tsconfigObject.compilerOptions = tsconfigObject.compilerOptions || {};
|
tsconfigObject.compilerOptions = tsconfigObject.compilerOptions || {};
|
||||||
@ -13,10 +14,10 @@ export const run = async (projectArg: Project) => {
|
|||||||
tsconfigObject.compilerOptions.paths = {};
|
tsconfigObject.compilerOptions.paths = {};
|
||||||
const tsPublishMod = await import('@git.zone/tspublish');
|
const tsPublishMod = await import('@git.zone/tspublish');
|
||||||
const tsPublishInstance = new tsPublishMod.TsPublish();
|
const tsPublishInstance = new tsPublishMod.TsPublish();
|
||||||
const publishModules = tsPublishInstance.getModuleSubDirs(paths.cwd);
|
const publishModules = await tsPublishInstance.getModuleSubDirs(paths.cwd);
|
||||||
for (const publishModule of Object.keys(publishModules)) {
|
for (const publishModule of Object.keys(publishModules)) {
|
||||||
const publishConfig = publishModules[publishModule];
|
const publishConfig = publishModules[publishModule];
|
||||||
tsconfigObject.compilerOptions.paths[`${publishConfig.moduleName}`] = [`./${publishModule}/index.ts`];
|
tsconfigObject.compilerOptions.paths[`${publishConfig.name}`] = [`./${publishModule}/index.ts`];
|
||||||
}
|
}
|
||||||
tsconfigSmartfile.setContentsFromString(JSON.stringify(tsconfigObject, null, 2));
|
tsconfigSmartfile.setContentsFromString(JSON.stringify(tsconfigObject, null, 2));
|
||||||
await tsconfigSmartfile.write();
|
await tsconfigSmartfile.write();
|
||||||
|
@ -29,10 +29,10 @@ export let run = async (writeArg: boolean = true): Promise<any> => {
|
|||||||
await formatGitignore.run(project);
|
await formatGitignore.run(project);
|
||||||
|
|
||||||
// format TypeScript
|
// format TypeScript
|
||||||
const formatPrettier = await import('./format.prettier.js');
|
|
||||||
await formatPrettier.run(project);
|
|
||||||
const formatTsConfig = await import('./format.tsconfig.js');
|
const formatTsConfig = await import('./format.tsconfig.js');
|
||||||
await formatTsConfig.run(project);
|
await formatTsConfig.run(project);
|
||||||
|
const formatPrettier = await import('./format.prettier.js');
|
||||||
|
await formatPrettier.run(project);
|
||||||
|
|
||||||
// format readme.md
|
// format readme.md
|
||||||
const formatReadme = await import('./format.readme.js');
|
const formatReadme = await import('./format.readme.js');
|
||||||
|
Reference in New Issue
Block a user