I'm working on a simple little MVC framework for personal use, and want to be able to manage multiple projects within FlashDevelop, one for the server-sided code and another for client-side javascript stuff.
However, FlashDevelop doesn't appear to be able to build multiple projects at the same time. This is a problem, especially since FD doesn't even support multiple instances by default, because it means that I'd have to close and reopen FD any time I want to build a subproject.
This is my current project layout:
> /
-->MyMVCProject.hxproj
-->src/
---->src/controllers
---->src/models
---->sc/framework_stuff
-->client/
---->client/client.hxproj
---->client/views
------>client/views/scripts
So the client project (including source files and .hxproj, and views) is a subdirectory of the "main" project. When the client.hxproj is built, it will output all the built javascript files to the relevant client/views/scripts folder, and then a post-build script will copy it out to the correct server location for testing. This is fine when client.hxproj is the one that is currently open in flashdevelop, but since it is in a subdirectory of the main project, it means that I cannot work on the "main" server-sided code.
My ideal workflow for this framework would be as follows:
- Run a project generation script which will generate the file/folder structure above so I can start working
- Work on both the server-sided .hx files AND client-sided .hx files in flashdevelop at the same time (which is currently possible since the client code is in a subdirectory, so it all shows up in FD's "Project" panel)
- When you want to test a change, run the regular test/build command in FD by pressing F5 or clicking the blue arrow:
- Pre-build script will compile the client.hxproj in the subdirectory (this is what I need help with!)
- FD will then build the regular server-sided (active) .hxproj as usual
- Post-build script will automatically copy all the files to the server for testing and open your browser
- GOTO step 2, rinse, and repeat
This would be easy if the haxe compiler could understand .hxproj files, but that doesn't appear to be the case. So is there some way to invoke FlashDevelop's build system from the command line to build an .hxproj file? Or is there a better way to do what I'm trying to do (without using a different IDE)?