Skip to content

Commit

Permalink
fix: path for templates, again =)
Browse files Browse the repository at this point in the history
  • Loading branch information
amphro committed Mar 3, 2020
1 parent bf94cd5 commit ccd7396
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ditamap/ditamap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ registerHelper('isCodeBlock', function(this: any, val, options) {
registerHelper('nextVersion', value => parseInt(value, 2) + 1);

export abstract class Ditamap {
public static templatesDir = 'templates';
public static templatesDir = join(__dirname, '..', '..', 'templates');

public static outputDir: string;

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

constructor(private filename: string, protected data: JsonMap) {
this.source = join(__dirname, '..', '..', Ditamap.templatesDir, this.getTemplateFileName());
(this.source = Ditamap.templatesDir), this.getTemplateFileName();
this.destination = join(Ditamap.outputDir, filename);
}

Expand Down
3 changes: 2 additions & 1 deletion src/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
JsonMap
} from '@salesforce/ts-types';
import * as chalk from 'chalk';
import { join } from 'path';
import { BaseDitamap } from './ditamap/base-ditamap';
import { CLIReference } from './ditamap/cli-reference';
import { CLIReferenceTopic } from './ditamap/cli-reference-topic';
Expand All @@ -27,7 +28,7 @@ import { SubTopicDitamap } from './ditamap/subtopic-ditamap';
import { TopicDitamap } from './ditamap/topic-ditamap';
import { copyStaticFile, events } from './utils';

const templatesDir = 'templates';
const templatesDir = join(__dirname, '..', 'templates');

export class Docs {
public constructor(
Expand Down

0 comments on commit ccd7396

Please sign in to comment.