[TechDocs] Added configuration for local publishing target

This patch adds a configuration option for setting the "local"
techdocs target directory. The target directory can be set using
the "techdocs.publisher.local.publishDirectory".

This fixes two "TODOs" in the "plugins/techdocs-node/src/stages
/publish/local.ts" file:

*  Use a more persistent storage than node_modules or /tmp directory.
   Make it configurable with techdocs.publisher.local.publishDirectory
*  Move the logic of setting staticDocsDir based on config over to
   fromConfig, and set the value as a class parameter.

Signed-off-by: Niklas Aronsson <niklasar@axis.com>
This commit is contained in:
Niklas Aronsson
2022-04-25 13:15:21 +02:00
parent fe391c8bb4
commit 860765ff45
6 changed files with 82 additions and 25 deletions
+7
View File
@@ -66,6 +66,13 @@ export interface Config {
publisher?:
| {
type: 'local';
local?: {
/**
* Directory to store generated static files.
*/
publishDirectory?: string;
};
}
| {
type: 'awsS3';