[TxMt] Creating a bundle command to compile Flex
Allan Odgaard
throw-away-1 at macromates.com
Sat Mar 31 14:49:04 UTC 2007
On 28. Mar 2007, at 10:08, Alastair Dawson wrote:
> I'm trying to create a bundle command that will compile a Flex
> (.mxml) file using fcsh (the flex compiler shell http://
> labs.adobe.com/wiki/index.php/Flex_Compiler_Shell) unlike the mxmlc
> compiler fcsh keeps things in memory so it's much much faster.
>
> Long story short to use the fcsh compiler you would open up the
> Terminal and run
>
> $ fcsh
>
> which launches the compiler, then you compile the mxml file as you
> normally would
>
> (fcsh) mxmlc /pathto/my.mxml
>
> that mxml file gets assigned an ID (say '1'), from then on you use
> the command
>
> (fcsh) compile 1
>
> I can get fcsh to run from a bundle command, but how I can I have
> it wait to launch then run 'mxmlc /pathto/my.mxml' the first time
> but then 'compile 1' thereafter? (All within the original Terminal
> window). If all three steps together are impossible, could I have
> it just run 'compile 1' in a Terminal window in which I've manually
> run steps 1 and 2?
You would need to start a server process that launches fcsh (with its
input/output attached to a pipe under the control of this server
process) and then communicate with this server process.
The TerminalMate bundle [1] does this, and might be good to look at.
Otherwise ask, and I or someone else can elaborate.
[1] http://macromates.com/svn/Bundles/trunk/Bundles/
TerminalMate.tmbundle/
More information about the textmate
mailing list