All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ofiles.profile.7.0.0.source-code.create-template.groovy Maven / Gradle / Ivy

The newest version!
description( "Creates a new template for the profile" ) {
  usage "grails create-template [Template Name]"
  argument name:'Template Name', description:"The name of the template", required:true
  flag name:'force', description:"Whether to overwrite existing files"
}

if(args) {
	def model = model( args[0] )
    render template:'templates/GeneratorTemplate.groovy',
		   destination:file("templates/${model.packagePath}/${model.simpleName}.groovy"),
		   model: model,
		   overwrite: flag('force')

}
else {
    error "No command name specified"
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy