This repository was archived by the owner on Nov 28, 2017. It is now read-only.
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.
This PR adds better coverage to Tails by using
browserifyinstead ofcoffeeto create a browser version of Tails. Previously, thecoffeecommand would join the all the sources before compilation, resulting in test coverage over one file. It was then bundled with all the dependencies usingconcat.This PR changes the build steps.
coffeewill no longer join the files before compilation, resulting in a separate module per file (and separate exports), that allow for Node-style importing of parts of Tails. These modules are joined in the right order (automatically) bybrowserify, yielding a browser compatible version of Tails in thetails.browser.jsfile. This file is then bundled along with all the external dependencies usingconcatas before.The part that allows for the better coverage and that is the main reason for this PR is the
browserifystep, which can apply a transform on each file during bundling. Using thebrowserify-istanbultemplate as a transform along with our existinggrunt-template-jasmine-istanbulmagically results in coverage data per file since the files are instrumented by thebrowserify-istanbultemplate before joining.Other consequences of this PR are the renaming of the
statisticsfolder tostat, the fact that in some places there arerequire-statements inside of function to prevent circular dependencies and therivets-tails.coffeefile not exporting anything, since it...doesn't...export...anything...I think this PR might be ready to be merged, but please proceed with caution since a lot of things have been changed. Please look over the changes and let me know what you think @joostverdoorn @rogierslag