Bug 928195 - Part 5: mach command for generating WebIDL example files; r=froydnj

--HG--
extra : rebase_source : c74d5f9556ca866622b7fefd4711e96fe4e4e020
This commit is contained in:
Gregory Szorc 2013-11-14 10:34:55 -08:00
parent b47eeb6ab3
commit faf292b942

View File

@ -18,6 +18,17 @@ from mozbuild.base import MachCommandBase
@CommandProvider
class WebIDLProvider(MachCommandBase):
@Command('webidl-example', category='misc',
description='Generate example files for a WebIDL interface.')
@CommandArgument('interface', nargs='+',
help='Interface(s) whose examples to generate.')
def webidl_example(self, interface):
from mozwebidlcodegen import BuildSystemWebIDL
manager = self._spawn(BuildSystemWebIDL).manager
for i in interface:
manager.generate_example_files(i)
@Command('webidl-parser-test', category='testing',
description='Run WebIDL tests.')
@CommandArgument('--verbose', '-v', action='store_true',