gen_template_grapix v0.2.0 GenTemplateGrapix
GenTemplateGrapix
A MixTemplate-compatible template for generating modular GraphQL API
projects. Although you can use it directly with mix gen
, you should
consider using mix gpx.new
, which wraps use of this and other
templates into a simpler command-line tool.
Installation
You probably will need to install the MixTemplates and MixGenerator:
$ mix archive.install hex mix_templates
$ mix archive.install hex mix_generator
Then install this template locally to your machine:
$ mix template.install hex gen_template_grapix
Finally, generate a Grapix project:
$ mix gen gen_template_grapix my_project
License
Apache 2.0. See LICENSE.md for details.
Created: 2020-02-19Z
Link to this section Summary
Functions
Return the name or path of a template that this template is based upon. That template will be processed first, and then this one will be executed.
Override this function to do any cleanup after your template has been copied into the user project. One use of this is to remove unwanted files created by a template upon which this template is based.
Return the name of this template as an atom. This is the name passed to the gen command.
Return the list of options supported by this template.
Return the short description of this template, or nil.
Return the absolute path to the tree that is to be copied when
instantiating this template. This top-level dir will typically
just contain a directory called $APP_NAME$
.
Link to this section Functions
based_on()
Return the name or path of a template that this template is based upon. That template will be processed first, and then this one will be executed.
clean_up(assigns)
Override this function to do any cleanup after your template has been copied into the user project. One use of this is to remove unwanted files created by a template upon which this template is based.
name()
Return the name of this template as an atom. This is the name passed to the gen command.
options()
Return the list of options supported by this template.
short_desc()
Return the short description of this template, or nil.
source_dir()
Return the absolute path to the tree that is to be copied when
instantiating this template. This top-level dir will typically
just contain a directory called $APP_NAME$
.