};
}
- }
+ },
+ /**
+ * this might be nice as a standard bit of code..
+ */
+
+ parseArgv : function(){
+
+ var args = Array.prototype.slice.call(Seed.argv);
+ args.shift(); //seed
+ args.shift(); // pack.js
+ var cfg = {
+ files : [],
+ target : false,
+ }
+
+
+ for(var i =0; i < args.length;i++) {
+ if (args[i] == '-o') {
+ cfg.target = args[i+1];
+ i++;
+ continue;
+ }
+ if (args[i] == '-O') {
+ cfg.debugTarget = args[i+1];
+ i++;
+ continue;
+ }
+ if (args[i] == '-t') {
+ cfg.translateJSON = args[i+1];
+ i++;
+ continue;
+ }
+ if (args[i] == '-w') {
+ cfg.tmpDir = args[i+1];
+ i++;
+ continue;
+ }
+ if (args[i] == '-p') {
+ cfg.prefix = args[i+1];
+ i++;
+ continue;
+ }
+
+ if (args[i] == '-C') {
+ cfg.cleanup = false;
+ continue;
+ }
+ if (args[i] == '-f') {
+ cfg.srcfile = args[i+1];
+ i++;
+ continue;
+ }
+ if (cfg.files.indexOf(args[i]) > -1) {
+ continue; // remove dupes.
+ }
+ cfg.files.push(args[i]);
+ }
+
}
\ No newline at end of file