https://bugzilla.mozilla.org/show_bug.cgi?id=566814
I've attached your patch and CC'ed you there. Thanks!
Drew
def mkpkg(arguments=sys.argv[1:],
env_root=os.path.abspath(os.path.dirname('__file__'))):
if len(arguments) == 2:
try:
for d in ['','/lib','/data']:
os.mkdir(env_root+'/'+arguments[1]+'/'+d)
except:
print >> sys.stderr, 'The Directory already exist.'
open(env_root+'/'+arguments[1]+'/package.json','w').write('{\n\t"author":"",\n\t"description":"new
addon"\n}')
open(env_root+'/'+arguments[1]+'/lib/main.js','w').write('exports.main =
function(){\n};')
if len(arguments) > 2:
print >> sys.stderr,'Too many arguments.'
if len(arguments) < 2:
print >> sys.stderr,'Please give me the name of your new package.'
--
Juli�n Ceballos
Developer Mozilla M�xico
I've updated my code in the gist:
http://gist.github.com/473366
This code have a validation of modules and a complex template for an addon with
an argument to add requires to the lib/main.js template.
Look the bug https://bugzilla.mozilla.org/show_bug.cgi?id=566814
El 12/07/10 18:25, Drew escribi�:
--