I am having a little trouble deciding on an API to configure the generators and plugins you want to load in for your project.
In the old version we would just require the ruby gems/files and they would just add themselves,
but now I want to get rid of require as I don't think it is a nice solution.
Now that we have a nice configuration mechanism where every plugin can add it's own configuration to be accessible from the project file, I think we should add this functionality there.
Here is how you can configure a project now:
require 'gator-as3'
gator.project do |p|
p.layout[:source, :main, :as3] = "src"
p.layout[:source, :test, :as3] = "test"
end
As you can see we still require 'gator-as3'. My plan now is that just requiring it will not add any generators or other functionality to gator. But it will add a configuration for gator-as3, where you then can go in and say I want to load the generators for as3 or mxml with my test framework (asunit3, asunit4, flexunit4 ).
My first draft of the api could be something like this:
gator.as3.test_framework = :asunit4
gator.as3.generators << :mxml
gator.as3.generators << :as3
Or this, which I think is a little better:
gator.as3.use :generators => [:as3, :mxml], :test => :flexunit4
I am still not sold on either of them, let me know how you would like to add your generators.
--
Dominic Graefen
Freelance: Interactive Developer / Creative Technologist