Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ApplicationTask.prototype.defineFrameworksTask = function()
{
// FIXME: platform requires...
if (!this._frameworksPath && this.environments().indexOf(require("objective-j/jake/environment").Browser) === -1)
return;
var buildPath = this.buildProductPath(),
newFrameworks = FILE.join(buildPath, "Frameworks"),
thisTask = this;
Jake.fileCreate(newFrameworks, function()
{
if (thisTask._frameworksPath === "capp")
OS.system(["capp", "gen", "-f", "--force", buildPath]);
else if (thisTask._frameworksPath)
{
if (FILE.exists(newFrameworks))
FILE.rmtree(newFrameworks);
// If there is a Frameworks/Source directory, move it temporarily
// so it doesn't get copied.
var sourcePath = FILE.join(thisTask._frameworksPath, "Source"),
hasSource = FILE.exists(sourcePath),
tempPath = FILE.join(FILE.cwd(), ".__capp_Frameworks_Source__");
if (hasSource)
FILE.move(sourcePath, tempPath);