Debian Codegraph @

util/buildscripts/jslib/convertTestsToXDomain.js

raw symbols SCIP
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
4 var startDir = arguments[0];
5 var xdDojoUrl = arguments[1];
6
7 load("jslib/fileUtil.js");
8 load("jslib/buildUtil.js");
9
10 var fileList = fileUtil.getFilteredFileList(startDir, /\.(html|htm)$/, true);
11
12 for(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 }