Allow specifying the PDFJS_NEXT
build flag via an environment variable when running the various gulp
commands
#8463
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After PR #8459, the run-time of the various
gulp
test commands has regressed quite badly on Windows. For me,gulp test
now takes approximately twice as long when run locally on Windows.The problem seems to be the Babel transpilation step, which takes well over five minutes to run.[1]
For someone like me, who runs tests a lot locally, this slowdown is really hurting the overall development experience.
To get around this I tested setting
PDFJS_NEXT = true
ingulpfile.js
, since the transpilation step isn't necessary when testing in a modern browser.However, having to edit
gulpfile.js
every time that I need to run tests isn't very practical. Hence this patch, which adds an environment variable that allows you to disable the transpilation simply by using e.g.PDFJS_NEXT=true gulp test
.I hope that this can be considered an acceptable solution, such that I don't need to maintain this patch locally (or worse, edit
gulpfile.js
locally before testing).[1] This can also be observed on the Windows bot, but it seems fine on Linux.