mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
New: added command objj2objskeleton. This feature is now not available from the command objj
This commit is contained in:
@@ -94,7 +94,6 @@ exports.run = function(args)
|
||||
print(" -I, --objj-include-paths include a specific framework paths")
|
||||
print(" -h, --help print this help");
|
||||
print(" -m, --multifiles launch objj on several files")
|
||||
print(" -c, --objc generate the objective-c class of the given file to the given folder. [file] [destination]")
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -111,14 +110,6 @@ exports.run = function(args)
|
||||
argv.shift();
|
||||
multipleFiles = true;
|
||||
break
|
||||
|
||||
case "-c":
|
||||
case "--objc":
|
||||
argv.shift();
|
||||
argv.unshift(require("file").path(module.path).dirname().join("objective-j/objective-c-parser.j"));
|
||||
argv.unshift("objj");
|
||||
|
||||
return OS.system(argv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
require("../common.jake");
|
||||
|
||||
// nib2cib uses fontinfo and imagesize and capp uses nib2cib
|
||||
subtasks(["fontinfo", "imagesize", "nib2cib", "capp", "capp_lint", "dump_theme", "XcodeCapp"], ["build", /*"clean", "clobber"*/]);
|
||||
subtasks(["fontinfo", "imagesize", "nib2cib", "objj2objcskeleton", "capp", "capp_lint", "dump_theme", "XcodeCapp"], ["build", /*"clean", "clobber"*/]);
|
||||
|
||||
subtasks(["fontinfo", "imagesize"], ["clean", "clobber"]);
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
require ("../../common.jake");
|
||||
|
||||
var FILE = require("file"),
|
||||
SYSTEM = require("system"),
|
||||
path = FILE.Path(FILE.join(SYSTEM.prefix, "bin", "objj2objcskeleton"));
|
||||
|
||||
sudo(["cp", "-f", "objj2objcskeleton", path]);
|
||||
sudo(["chmod", "755", path]);
|
||||
+21
-25
@@ -1,33 +1,29 @@
|
||||
/*
|
||||
* parser.j
|
||||
*
|
||||
* Created by Francisco Tolmasky.
|
||||
* Modified by Antoine Mercadal, with great help from Martin Carlberg
|
||||
* Copyright 2008-2013, 280 North, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
#!/usr/bin/env objj
|
||||
|
||||
@import <Foundation/Foundation.j>
|
||||
|
||||
var FILE = require("file"),
|
||||
OS = require("os"),
|
||||
stream = require("narwhal/term").stream,
|
||||
stream = require("narwhal/term").stream,
|
||||
|
||||
SLASH_REPLACEMENT = "∕"; // DIVISION SLASH, Unicode: U+2215
|
||||
|
||||
function main(args)
|
||||
{
|
||||
args.shift();
|
||||
|
||||
if (args.length < 1)
|
||||
return printUsage();
|
||||
|
||||
parser(args);
|
||||
}
|
||||
|
||||
function printUsage()
|
||||
{
|
||||
print("objj2objskeleton [FILE] [DESTINATION]");
|
||||
print("Convert a objective-j file to an objective-c files skeleton (.h and .m)")
|
||||
}
|
||||
|
||||
// Debug function to print some JS objects
|
||||
function dump(obj)
|
||||
{
|
||||
@@ -152,12 +148,12 @@ function removeLastSlashIfNecessary(path)
|
||||
$1 Full project source path
|
||||
$2 Destination
|
||||
*/
|
||||
function main(args)
|
||||
function parser(args)
|
||||
{
|
||||
try
|
||||
{
|
||||
var projectBasePath = removeLastSlashIfNecessary(args[2]),
|
||||
sourcePath = args[1],
|
||||
var projectBasePath = removeLastSlashIfNecessary(args[1]),
|
||||
sourcePath = args[0],
|
||||
outputDirectory = projectBasePath,
|
||||
baseFilename = shadowBaseNameForPath(projectBasePath, sourcePath),
|
||||
outputHeaderURL = new CFURL([outputDirectory stringByAppendingPathComponent:baseFilename + ".h"]),
|
||||
Reference in New Issue
Block a user