Extension api

close #44 : generator plugin API introduced.