fix(project): Fixed minor formatting issues and improved code consistency.
This commit is contained in:
@@ -7,11 +7,14 @@ import { PublishModule } from './classes.publishmodule.js';
|
||||
export class TsPublish {
|
||||
constructor() {}
|
||||
|
||||
public async publish (monorepoDirArg: string) {
|
||||
public async publish(monorepoDirArg: string) {
|
||||
const publishModules = await this.getModuleSubDirs(monorepoDirArg);
|
||||
logger.log('info', `Found ${Object.keys(publishModules).length} publish modules:`);
|
||||
for (const publishModule of Object.keys(publishModules)) {
|
||||
logger.log('info', `Publishing module: ${publishModule} -> ${publishModules[publishModule].name}`);
|
||||
logger.log(
|
||||
'info',
|
||||
`Publishing module: ${publishModule} -> ${publishModules[publishModule].name}`,
|
||||
);
|
||||
}
|
||||
for (const publishModule of Object.keys(publishModules)) {
|
||||
const publishModuleInstance = new PublishModule({
|
||||
@@ -25,9 +28,9 @@ export class TsPublish {
|
||||
}
|
||||
}
|
||||
|
||||
public async getModuleSubDirs (dirArg: string) {
|
||||
public async getModuleSubDirs(dirArg: string) {
|
||||
const subDirs = await plugins.smartfile.fs.listFolders(dirArg);
|
||||
const publishModules: {[key: string]: interfaces.ITsPublishJson} = {};
|
||||
const publishModules: { [key: string]: interfaces.ITsPublishJson } = {};
|
||||
for (const subDir of subDirs) {
|
||||
if (!subDir.startsWith('ts')) {
|
||||
continue;
|
||||
@@ -38,9 +41,11 @@ export class TsPublish {
|
||||
continue;
|
||||
}
|
||||
logger.log('info', `found publish module: ${subDir}`);
|
||||
publishModules[subDir] = JSON.parse(plugins.smartfile.fs.toStringSync(plugins.path.join(subDir, 'tspublish.json')));
|
||||
publishModules[subDir] = JSON.parse(
|
||||
plugins.smartfile.fs.toStringSync(plugins.path.join(subDir, 'tspublish.json')),
|
||||
);
|
||||
}
|
||||
logger.log('ok', `found ${publishModules.length} publish modules`);
|
||||
return publishModules;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user