Screenshotter chdir to KaTeX root directory (#1502)

* Screenshotter chdir to KaTeX root directory

Fix #1501.  This seems to be required for webpack, specifically
`babel-plugin-version-inline`, to run correctly.

* lint fix
This commit is contained in:
Erik Demaine
2018-07-24 14:32:01 -04:00
committed by ylemkimon
parent 9fe5e221e5
commit e454eb3b3e

View File

@@ -17,12 +17,12 @@ const webpackDevServer = require("webpack-dev-server");
const webpackConfig = require("../../webpack.dev");
const data = require("../../test/screenshotter/ss_data");
const dstDir = path.normalize(
path.join(__dirname, "..", "..", "test", "screenshotter", "images"));
const diffDir = path.normalize(
path.join(__dirname, "..", "..", "test", "screenshotter", "diff"));
const newDir = path.normalize(
path.join(__dirname, "..", "..", "test", "screenshotter", "new"));
// Change to KaTeX root directory so that webpack (in particular
// babel-plugin-version-inline) runs correctly.
process.chdir(path.join(__dirname, "..", ".."));
const dstDir = path.normalize(path.join("test", "screenshotter", "images"));
const diffDir = path.normalize(path.join("test", "screenshotter", "diff"));
const newDir = path.normalize(path.join("test", "screenshotter", "new"));
//////////////////////////////////////////////////////////////////////
// Process command line arguments