diff options
| author | Di Peng | 2011-07-14 18:28:15 -0700 | 
|---|---|---|
| committer | Igor Minar | 2011-07-17 22:19:08 -0700 | 
| commit | f9b4c9da648f81aef1fbee41d24822e420eb56f9 (patch) | |
| tree | 35d40aeda6d1aca27d4b283faf8d84a776b0a141 /docs/src/writer.js | |
| parent | 83ac1193f2322f71f314e7e160af46142b01a290 (diff) | |
| download | angular.js-f9b4c9da648f81aef1fbee41d24822e420eb56f9.tar.bz2 | |
refactor(docs): run e2e tests with and without jquery
- e2e tests will run index.html (without jquery) and with
index-jq.html(with jquery).
- many small changes to make e2e tests work withough JQuery as we
discover problems that were previously hidden by using real JQuery.
Diffstat (limited to 'docs/src/writer.js')
| -rw-r--r-- | docs/src/writer.js | 11 | 
1 files changed, 7 insertions, 4 deletions
| diff --git a/docs/src/writer.js b/docs/src/writer.js index 9ad202d9..0655572d 100644 --- a/docs/src/writer.js +++ b/docs/src/writer.js @@ -59,16 +59,19 @@ exports.makeDir = function (path, callback) {  };  exports.copyTpl = function(filename, callback) { -  copy('docs/src/templates/' + filename, OUTPUT_DIR + filename, callback); +  exports.copy('docs/src/templates/' + filename, OUTPUT_DIR + filename, callback);  }; -function copy(from, to, callback) { +exports.copy = function(from, to, callback, replacementKey, replacement) {    //console.log('writing', to, '...');    fs.readFile(from, function(err, content){      if (err) return callback.error(err); +    if(replacementKey && replacement) { +      content = content.toString().replace(replacementKey, replacement); +    }      fs.writeFile(to, content, callback);    }); -} +};  exports.copyDir = function copyDir(dir, callback) {    exports.makeDir(OUTPUT_DIR + '/' + dir, callback.waitFor(function(){ @@ -81,7 +84,7 @@ exports.copyDir = function copyDir(dir, callback) {            if (stat.isDirectory()) {              copyDir(dir + '/' + file, callback.waitFor());            } else { -            copy(path, OUTPUT_DIR  + '/' + dir + '/' + file, callback.waitFor()); +            exports.copy(path, OUTPUT_DIR  + '/' + dir + '/' + file, callback.waitFor());            }          }));        }); | 
