mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-09 04:07:12 +00:00
Update the default jakefiles with bug fixes and convenience tasks.
This commit is contained in:
@@ -8,10 +8,12 @@
|
||||
|
||||
var ENV = require("system").env,
|
||||
FILE = require("file"),
|
||||
task = require("jake").task,
|
||||
FileList = require("jake").FileList,
|
||||
JAKE = require("jake"),
|
||||
task = JAKE.task,
|
||||
FileList = JAKE.FileList,
|
||||
app = require("cappuccino/jake").app,
|
||||
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug";
|
||||
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug",
|
||||
OS = require("os");
|
||||
|
||||
app ("__project.nameasidentifier__", function(task)
|
||||
{
|
||||
@@ -24,7 +26,7 @@ app ("__project.nameasidentifier__", function(task)
|
||||
task.setAuthor("__organization.name__");
|
||||
task.setEmail("__organization.email__");
|
||||
task.setSummary("__project.name__");
|
||||
task.setSources(new FileList("**/*.j"));
|
||||
task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**")));
|
||||
task.setResources(new FileList("Resources/*"));
|
||||
task.setIndexFilePath("index.html");
|
||||
task.setInfoPlistPath("Info.plist");
|
||||
@@ -35,4 +37,45 @@ app ("__project.nameasidentifier__", function(task)
|
||||
task.setCompilerFlags("-O");
|
||||
});
|
||||
|
||||
task ("default", ["__project.nameasidentifier__"]);
|
||||
function printResults(configuration)
|
||||
{
|
||||
print("----------------------------")
|
||||
print(configuration+" app built at path: "+FILE.join("Build", configuration, "__project.nameasidentifier__"));
|
||||
print("----------------------------")
|
||||
}
|
||||
|
||||
task ("default", ["__project.nameasidentifier__"], function()
|
||||
{
|
||||
printResults(configuration);
|
||||
});
|
||||
|
||||
task ("build", ["default"]);
|
||||
|
||||
task ("debug", function()
|
||||
{
|
||||
ENV["CONFIGURATION"] = "Debug";
|
||||
JAKE.subjake(["."], "build", ENV);
|
||||
});
|
||||
|
||||
task ("release", function()
|
||||
{
|
||||
ENV["CONFIGURATION"] = "Release";
|
||||
JAKE.subjake(["."], "build", ENV);
|
||||
});
|
||||
|
||||
task ("run", ["debug"], function()
|
||||
{
|
||||
OS.system(["open", FILE.join("Build", "Debug", "__project.nameasidentifier__", "index.html")]);
|
||||
});
|
||||
|
||||
task ("run-release", ["release"], function()
|
||||
{
|
||||
OS.system(["open", FILE.join("Build", "Release", "__project.nameasidentifier__", "index.html")]);
|
||||
});
|
||||
|
||||
task ("deploy", ["release"], function()
|
||||
{
|
||||
FILE.mkdirs(FILE.join("Build", "Deployment", "__project.nameasidentifier__"));
|
||||
OS.system(["press", "-f", FILE.join("Build", "Release", "__project.nameasidentifier__), FILE.join("Build", "Deployment", __project.nameasidentifier__)]);
|
||||
printResults("Deployment")
|
||||
});
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
|
||||
var ENV = require("system").env,
|
||||
FILE = require("file"),
|
||||
task = require("jake").task,
|
||||
FileList = require("jake").FileList,
|
||||
JAKE = require("jake"),
|
||||
task = JAKE.task,
|
||||
FileList = JAKE.FileList,
|
||||
app = require("cappuccino/jake").app,
|
||||
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug";
|
||||
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug",
|
||||
OS = require("os");
|
||||
|
||||
app ("__project.nameasidentifier__", function(task)
|
||||
{
|
||||
@@ -24,7 +26,7 @@ app ("__project.nameasidentifier__", function(task)
|
||||
task.setAuthor("__organization.name__");
|
||||
task.setEmail("__organization.email__");
|
||||
task.setSummary("__project.name__");
|
||||
task.setSources(new FileList("**/*.j"));
|
||||
task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**")));
|
||||
task.setResources(new FileList("Resources/*"));
|
||||
task.setIndexFilePath("index.html");
|
||||
task.setInfoPlistPath("Info.plist");
|
||||
@@ -36,4 +38,45 @@ app ("__project.nameasidentifier__", function(task)
|
||||
task.setCompilerFlags("-O");
|
||||
});
|
||||
|
||||
task ("default", ["__project.nameasidentifier__"]);
|
||||
function printResults(configuration)
|
||||
{
|
||||
print("----------------------------")
|
||||
print(configuration+" app built at path: "+FILE.join("Build", configuration, "__project.nameasidentifier__"));
|
||||
print("----------------------------")
|
||||
}
|
||||
|
||||
task ("default", ["__project.nameasidentifier__"], function()
|
||||
{
|
||||
printResults(configuration);
|
||||
});
|
||||
|
||||
task ("build", ["default"]);
|
||||
|
||||
task ("debug", function()
|
||||
{
|
||||
ENV["CONFIGURATION"] = "Debug";
|
||||
JAKE.subjake(["."], "build", ENV);
|
||||
});
|
||||
|
||||
task ("release", function()
|
||||
{
|
||||
ENV["CONFIGURATION"] = "Release";
|
||||
JAKE.subjake(["."], "build", ENV);
|
||||
});
|
||||
|
||||
task ("run", ["debug"], function()
|
||||
{
|
||||
OS.system(["open", FILE.join("Build", "Debug", "__project.nameasidentifier__", "index.html")]);
|
||||
});
|
||||
|
||||
task ("run-release", ["release"], function()
|
||||
{
|
||||
OS.system(["open", FILE.join("Build", "Release", "__project.nameasidentifier__", "index.html")]);
|
||||
});
|
||||
|
||||
task ("deploy", ["release"], function()
|
||||
{
|
||||
FILE.mkdirs(FILE.join("Build", "Deployment", "__project.nameasidentifier__"));
|
||||
OS.system(["press", "-f", FILE.join("Build", "Release", "__project.nameasidentifier__), FILE.join("Build", "Deployment", __project.nameasidentifier__)]);
|
||||
printResults("Deployment")
|
||||
});
|
||||
|
||||
@@ -24,5 +24,21 @@ blend ("__project.nameasidentifier__.blend", function(__project.nameasidentifier
|
||||
__project.nameasidentifier__Task.setResources(new FileList("Resources/*"));
|
||||
});
|
||||
|
||||
task ("build", ["__project.nameasidentifier__.blend"]);
|
||||
task ("default", ["build"]);
|
||||
task ("default", ["__project.nameasidentifier__.blend"], function()
|
||||
{
|
||||
printResults(configuration);
|
||||
});
|
||||
|
||||
task ("build", ["default"]);
|
||||
|
||||
task ("debug", function()
|
||||
{
|
||||
ENV["CONFIGURATION"] = "Debug";
|
||||
JAKE.subjake(["."], "build", ENV);
|
||||
});
|
||||
|
||||
task ("release", function()
|
||||
{
|
||||
ENV["CONFIGURATION"] = "Release";
|
||||
JAKE.subjake(["."], "build", ENV);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user