Skip to content

Commit

Permalink
feat: Make outdir current working dir (#196)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This might only affect you if you have used glossarify-md
with third-party remark plug-ins which require file path configurations
and assume paths relative to 'process.cwd()'.
  • Loading branch information
about-code committed Oct 17, 2021
1 parent 833a170 commit 241d59d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/model/context.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import glob from "glob";
import path from "path";
import path from "node:path";
import proc from "node:process";
import { relativeFromTo, toForwardSlash } from "../path/tools.js";
import { init as initCollator } from "../text/collator.js";
import { Glossary } from "./glossary.js";


export function newContext(glossarifyMdConf) {
initCollator(glossarifyMdConf.i18n);
const context = new Context(glossarifyMdConf);
Expand Down Expand Up @@ -60,6 +62,7 @@ class Context {

setBaseDir(baseDir) {
this.conf.baseDir = toForwardSlash(baseDir);
proc.chdir(this.conf.baseDir);
}
}

Expand Down

0 comments on commit 241d59d

Please sign in to comment.