source: Dev/branches/rest-dojo-ui/client/util/buildscripts/jslib/convertTestsToXDomain.js @ 275

Last change on this file since 275 was 256, checked in by hendrikvanantwerpen, 13 years ago

Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).

File size: 574 bytes
Line 
1//Make a copy of the tests dir, then run this script, giving the location
2//of the tests copy, and the URL to use dojo.js
3
4var startDir = arguments[0];
5var xdDojoUrl = arguments[1];
6
7load("jslib/fileUtil.js");
8load("jslib/buildUtil.js");
9
10var fileList = fileUtil.getFilteredFileList(startDir, /\.(html|htm)$/, true);
11
12for(var i = 0; i < fileList.length; i++){
13        var fileName = fileList[i];
14        var fileContents = fileUtil.readFile(fileName);
15        fileContents = fileContents.replace(/src\=\".*dojo.js"/, 'src="' + xdDojoUrl + '"');
16        fileUtil.saveUtf8File(fileName, fileContents);
17}
Note: See TracBrowser for help on using the repository browser.