Skip to content

Commit ccd7396

Browse files
committed
fix: path for templates, again =)
1 parent bf94cd5 commit ccd7396

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/ditamap/ditamap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ registerHelper('isCodeBlock', function(this: any, val, options) {
2727
registerHelper('nextVersion', value => parseInt(value, 2) + 1);
2828

2929
export abstract class Ditamap {
30-
public static templatesDir = 'templates';
30+
public static templatesDir = join(__dirname, '..', '..', 'templates');
3131

3232
public static outputDir: string;
3333

@@ -45,7 +45,7 @@ export abstract class Ditamap {
4545
private source: string;
4646

4747
constructor(private filename: string, protected data: JsonMap) {
48-
this.source = join(__dirname, '..', '..', Ditamap.templatesDir, this.getTemplateFileName());
48+
(this.source = Ditamap.templatesDir), this.getTemplateFileName();
4949
this.destination = join(Ditamap.outputDir, filename);
5050
}
5151

src/docs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
JsonMap
1919
} from '@salesforce/ts-types';
2020
import * as chalk from 'chalk';
21+
import { join } from 'path';
2122
import { BaseDitamap } from './ditamap/base-ditamap';
2223
import { CLIReference } from './ditamap/cli-reference';
2324
import { CLIReferenceTopic } from './ditamap/cli-reference-topic';
@@ -27,7 +28,7 @@ import { SubTopicDitamap } from './ditamap/subtopic-ditamap';
2728
import { TopicDitamap } from './ditamap/topic-ditamap';
2829
import { copyStaticFile, events } from './utils';
2930

30-
const templatesDir = 'templates';
31+
const templatesDir = join(__dirname, '..', 'templates');
3132

3233
export class Docs {
3334
public constructor(

0 commit comments

Comments
 (0)