require '<%= plugin_name %>/version' require '<%= plugin_name %>/plugin_helper' require '<%= plugin_name %>/<%= plugin_name %>_processor' require '<%= plugin_name %>/dsl/<%= plugin_name %>_dsl' module <%= plugin_module_name %> extend Climatic::Utils::SafeExec def self.generate_build_files(entity_to_build, target_directory) # This is an example of what you could do to generate files, here using default detemplatization... PowerStencil.logger.debug "By default plugin '<%= plugin_name %>' uses standard build..." PowerStencil.project.engine.generate_build_files entity_to_build, target_directory end def self.post_build_hook(built_entity, generated_files_path) # This is an example of what you could do after files are generated, ie pretty much anything... case built_entity.type when :<%= plugin_name %>_entity generated_file = File.join generated_files_path, 'message.txt' # Enclose in `safely_exec_code` code that is protected by the `--simulate` command-line flag. safely_exec_code(message: "Displaying content of '#{generated_file}'.") do puts File.readlines(generated_file) end else raise PowerStencil::Error, "Plugin '<%= plugin_name %>' doesnt know how handle the build of a '#{built_entity.type}' type !" end end end