Open steffansluis opened 9 years ago
I really like the changeset and I see nothing wrong with it. I still would like to test it on staging and development before letting production depend on it though
Good job! :+1:
@joostverdoorn @rogierslag Is this PR still useful? I think I heard something about reviving Tails, but for now, I think this PR should be either merged or closed, depending on whether or not you are still using Tails in its current form.
Right now its still being used, but in the near future we plan on dropping it in favour of Graphql
This PR adds better coverage to Tails by using
browserify
instead ofcoffee
to create a browser version of Tails. Previously, thecoffee
command 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.
coffee
will 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.js
file. This file is then bundled along with all the external dependencies usingconcat
as before.The part that allows for the better coverage and that is the main reason for this PR is the
browserify
step, which can apply a transform on each file during bundling. Using thebrowserify-istanbul
template as a transform along with our existinggrunt-template-jasmine-istanbul
magically results in coverage data per file since the files are instrumented by thebrowserify-istanbul
template before joining.Other consequences of this PR are the renaming of the
statistics
folder tostat
, the fact that in some places there arerequire
-statements inside of function to prevent circular dependencies and therivets-tails.coffee
file 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