Comparing version 0.0.13 to 0.0.14
@@ -50,4 +50,2 @@ var _ = require("underscore-keypath"); | ||
this.ok(JSON.stringify(this.options, null, " ")); | ||
model.prefix = this.options.fieldPrefix; | ||
@@ -54,0 +52,0 @@ model.fieldStyle = this.options.fieldStyle; |
11
index.js
@@ -10,3 +10,3 @@ #!/usr/bin/env node | ||
cli.parse({ | ||
type : ["t", "Generator type: segue | reuse | strings ", "string"], | ||
type : ["t", "Generator type: segue | reuse | strings | asset", "string"], | ||
@@ -26,4 +26,9 @@ fieldStyle : [null, "Field naming style: uppercase | camelcase", "string", "camelcase"], | ||
var xcodeIO = require("./lib/xcode-io")(); | ||
options.inputs = xcodeIO.inputs; | ||
options.output = xcodeIO.outputs[0]; | ||
if(xcodeIO.provided){ | ||
options.inputs = xcodeIO.inputs; | ||
options.output = xcodeIO.outputs[0]; | ||
} | ||
else{ | ||
options.inputs = args; | ||
} | ||
@@ -30,0 +35,0 @@ var generator; |
@@ -19,6 +19,2 @@ "use strict"; | ||
function ensureAbsolute(filepath){ | ||
if(filepath == "stdout") { | ||
return filepath; | ||
} | ||
var absolute = path.resolve(filepath) == path.normalize(filepath); | ||
@@ -33,11 +29,3 @@ if (absolute) { | ||
module.exports = function(env){ | ||
var cli = require("cli"); | ||
var pInputs = _.map(cli.args, ensureAbsolute); | ||
var pOutputs = cli.options.output ? [ensureAbsolute(cli.options.output)] : null; | ||
if(env === undefined){ | ||
env = process.env; | ||
} | ||
env = env || process.env; | ||
var xcodeInputs = resolve(createList(env, "SCRIPT_INPUT_FILE")); | ||
@@ -47,4 +35,5 @@ var xcodeOutputs = createList(env, "SCRIPT_OUTPUT_FILE"); | ||
return { | ||
"inputs" : xcodeInputs.length > 0 ? xcodeInputs : pInputs, | ||
"outputs" : xcodeOutputs.length > 0 ? xcodeOutputs : pOutputs | ||
"inputs" : xcodeInputs, | ||
"outputs" : xcodeOutputs, | ||
"provided" : xcodeInputs.length > 0 || xcodeOutputs.length > 0 | ||
}; | ||
@@ -51,0 +40,0 @@ }; |
@@ -7,3 +7,3 @@ { | ||
"main" : "generator.js", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
@@ -10,0 +10,0 @@ "scripts" : { |
@@ -8,3 +8,2 @@ var xpath = require('xpath'); | ||
var xmlUtil = require("./lib/xml-util"); | ||
var template = Handlebars.compile(fs.readFileSync(path.join(__dirname, "reuse.handlebars")).toString()); | ||
var model = require("./lib/model"); | ||
@@ -11,0 +10,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80910
23
2248
9