Skip to content

Commit

Permalink
Released new version of oslo-generator-html
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofVDB1 committed Sep 23, 2024
1 parent e7f187b commit 2691152
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/oslo-generator-html/lib/HtmlGenerationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { SpecificationType } from './utils/specificationTypeEnum';
export class HtmlGenerationService implements IService {
public readonly logger: Logger;
public readonly configuration: HtmlGenerationServiceConfiguration;
public dirs: string[] = [resolve(`${__dirname}/templates`)];
public dirs: string[] = [];

public constructor(
@inject(ServiceIdentifier.Logger) logger: Logger,
Expand All @@ -33,6 +33,8 @@ export class HtmlGenerationService implements IService {

const customTemplatesDir: string = resolve(templatesPath);
this.dirs.push(customTemplatesDir);
} else {
this.dirs.push(resolve(`${__dirname}/templates`));
}

const env = nj.configure(this.dirs);
Expand All @@ -48,7 +50,7 @@ export class HtmlGenerationService implements IService {
]);

if (this.configuration.templates && this.configuration.rootTemplate) {
indexPath = `${this.dirs[1]}/${this.configuration.rootTemplate}`;
indexPath = `${this.dirs[0]}/${this.configuration.rootTemplate}`;
} else {
indexPath =
this.configuration.specificationType === SpecificationType.Vocabulary
Expand Down
2 changes: 1 addition & 1 deletion packages/oslo-generator-html/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oslo-flanders/html-generator",
"version": "0.0.19-alpha.0",
"version": "0.0.20-alpha.0",
"description": "Generates an HTML file using an OSLO webuniversum config",
"author": "Digitaal Vlaanderen <https://data.vlaanderen.be/id/organisatie/OVO002949>",
"homepage": "https://github.com/informatievlaanderen/OSLO-UML-Transformer/tree/main/packages/oslo-generator-html#readme",
Expand Down

0 comments on commit 2691152

Please sign in to comment.