diff --git a/README.md b/README.md index 9f32274..045abd9 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ See the [Compatiblity and Feature List](https://github.com/alex-seville/blanket/ 1. `git clone git@github.com:alex-seville/blanket.git` 2. `npm install` 3. Add your custom build details to the grunt.js file under `concat` -3. `grunt buildit` +3. `grunt build` A minified and unminfied copy of the source can be created (see the `min` task). diff --git a/src/blanket.js b/src/blanket.js index 097b717..075ba60 100644 --- a/src/blanket.js +++ b/src/blanket.js @@ -47,7 +47,8 @@ var parseAndModify = (inBrowser ? window.falafel : require("falafel")); testReadyCallback:null, commonJS:false, instrumentCache:false, - modulePattern: null + modulePattern: null, + successRate: 60 }; if (inBrowser && typeof window.blanket !== 'undefined'){ diff --git a/src/config.js b/src/config.js index e8d81d2..140d0d8 100644 --- a/src/config.js +++ b/src/config.js @@ -71,6 +71,12 @@ newOptions.instrumentCache = true; } } + if (es.nodeName === "data-cover-successRate") { + var successRate = +es.nodeValue; + if (successRate) { + newOptions.successRate = successRate; + } + } }); blanket.options(newOptions); diff --git a/src/qunit/reporter.js b/src/qunit/reporter.js index c27dcac..529ad85 100644 --- a/src/qunit/reporter.js +++ b/src/qunit/reporter.js @@ -1,6 +1,6 @@ blanket.defaultReporter = function(coverage){ var cssSytle = "#blanket-main {margin:2px;background:#EEE;color:#333;clear:both;font-family:'Helvetica Neue Light', 'HelveticaNeue-Light', 'Helvetica Neue', Calibri, Helvetica, Arial, sans-serif; font-size:17px;} #blanket-main a {color:#333;text-decoration:none;} #blanket-main a:hover {text-decoration:underline;} .blanket {margin:0;padding:5px;clear:both;border-bottom: 1px solid #FFFFFF;} .bl-error {color:red;}.bl-success {color:#5E7D00;} .bl-file{width:auto;} .bl-cl{float:left;} .blanket div.rs {margin-left:50px; width:150px; float:right} .bl-nb {padding-right:10px;} #blanket-main a.bl-logo {color: #EB1764;cursor: pointer;font-weight: bold;text-decoration: none} .bl-source{ overflow-x:scroll; background-color: #FFFFFF; border: 1px solid #CBCBCB; color: #363636; margin: 25px 20px; width: 80%;} .bl-source div{white-space: pre;font-family: monospace;} .bl-source > div > span:first-child{background-color: #EAEAEA;color: #949494;display: inline-block;padding: 0 10px;text-align: center;width: 30px;} .bl-source .miss{background-color:#e6c3c7} .bl-source span.branchWarning{color:#000;background-color:yellow;} .bl-source span.branchOkay{color:#000;background-color:transparent;}", - successRate = 60, + successRate = blanket.options("successRate"), head = document.head, fileNumber = 0, body = document.body,