Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var XibsToConvert = ["FlickrWindow", "FacebookWindow", "TwitterWindow",
- "YouTubeWindow", "LinkTEProperties", "HighlightTEProperties",
- "ImageTEProperties", "TwitterFeedTEProperties","TextTEProperties"];
- task( "nibs", function()
- {
- // Tried using JAKE.file but that didn't not want to work with subdirectories,
- // i.e. Resources/
- for ( var idx = 0; idx < XibsToConvert.length; idx++ ) {
- var filenameXib = "Resources/../Xibs/" + XibsToConvert[idx] + ".xib";
- var filenameCib = "Resources/" + XibsToConvert[idx] + ".cib";
- if ( !FILE.exists(filenameCib) || FILE.mtime(filenameXib) > FILE.mtime(filenameCib) ) {
- print("Converting to cib: " + filenameXib);
- OS.system(["nib2cib", filenameXib, filenameCib]);
- } else {
- print("Ignoring " + filenameXib + " -> has been converted");
- }
- }
- });
- task("test", function()
- {
- print("============> WARNING");
- print("Ensure that test filenames are the same as the class that is defined");
- print("E.g. TweetTest.j for TweetTest and not tweet_test.j (i.e. rails style)");
- print("Otherwise you'll get a strange error: >>objj [warn]: unable to get tests<<");
- print("============> END WARNING");
- var tests = new FileList('Test/**/*Test.j');
- var moretests = new FileList('Test/**/*_test.j');
- var cmd = ["ojtest"].concat(tests.items()).concat(moretests.items());
- //print( cmd.map(OS.enquote).join(" ") );
- var cmdString = cmd.map(OS.enquote).join(" ");
- var code = OS.system(cmdString);
- if (code !== 0)
- OS.exit(code);
- });
Add Comment
Please, Sign In to add comment