Skip to content

Commit

Permalink
Restore the ability to run 'npm run test:reference' now that PR #1074
Browse files Browse the repository at this point in the history
has been merged. Fixes Issue #1088.
  • Loading branch information
ronyeh committed Aug 1, 2021
1 parent 7a682f7 commit 4edc170
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tools/generate_png_images.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,16 @@ if (process.argv.length >= 5) {
}
}

if (scriptDir.includes('reference') || scriptDir.includes('releases')) {
if (scriptDir.includes('releases')) {
// THE OLD WAY loads two JS files.
// TODO: Remove line 32 "scriptDir.includes('reference') ||"
// after PR #1074 has been merged, becoming the new 'reference/'.
// TODO: Remove this entire block lines 32-40, after the new version has been moved to 'releases/'
// TODO: Remove this block lines 31-37, after the new version has been moved to 'releases/'
global.Vex = require(`${scriptDir}/vexflow-debug.js`);
require(`${scriptDir}/vexflow-tests.js`);
global.Vex.Flow.shims = { fs, process };
} else {
// THE NEW WAY loads a single JS file.
// See: https://github.com/0xfe/vexflow/pull/1074
// Load from the build/ folder.
// TODO: Delete lines 32-40 above after PR #1074 has been merged and released!
// Load from the build/ or reference/ folder.
global.Vex = require(`${scriptDir}/vexflow-tests.js`);
global.Vex.Flow.Test.shims = { fs, process };
}
Expand Down

0 comments on commit 4edc170

Please sign in to comment.