source: Dev/trunk/src/client/util/buildscripts/jslib/convertTestsToXDomain.js @ 485

Last change on this file since 485 was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

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.