From b2f63efa181fb5bd87f5638b492a9d332a49715d Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Mon, 28 Oct 2024 21:53:18 +0100 Subject: [PATCH] feat(classes.publishmodule): Added copying of readme and license files to publish directory --- changelog.md | 5 +++++ ts/00_commitinfo_data.ts | 2 +- ts/classes.publishmodule.ts | 12 ++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index c7c7236..4685cb4 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,10 @@ # Changelog +## 2024-10-28 - 1.6.0 - feat(classes.publishmodule) +Added copying of readme and license files to publish directory + +- Enhanced the createPublishModuleDir method in PublishModule class to copy the 'readme.md' and 'license' files to the publish directory. + ## 2024-10-28 - 1.5.5 - fix(core) Handled non-existent package in publish module to avoid errors diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 8b5fb9a..4927db7 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@git.zone/tspublish', - version: '1.5.5', + version: '1.6.0', description: 'A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.' } diff --git a/ts/classes.publishmodule.ts b/ts/classes.publishmodule.ts index 8cc7365..8e1d9c1 100644 --- a/ts/classes.publishmodule.ts +++ b/ts/classes.publishmodule.ts @@ -171,6 +171,18 @@ export class PublishModule { this.options.packageSubFolderFullPath, plugins.path.join(this.options.publishModDirFullPath, this.options.packageSubFolder) ); + + // readme + await plugins.smartfile.fs.copy( + plugins.path.join(this.options.packageSubFolderFullPath, 'readme.md'), + plugins.path.join(this.options.publishModDirFullPath, 'readme.md') + ); + + // license + await plugins.smartfile.fs.copy( + plugins.path.join(this.options.monoRepoDir, 'license'), + plugins.path.join(this.options.publishModDirFullPath, 'license') + ); } public async build() {