aqua v0.9.2 Aqua.Schema.Scaffold
- mix aqua new console my_proj --no-test --force
Link to this section Summary
Functions
Sets Scaffold to invalid, if the value of project_type is :flat
Calculate pathes for scaffolding project. Pathes for umbrella differs from pathes for flat project
This function populate generic assigns, that will be used inside injected document
Loads LocalTemplate, and stores it inside :template key inside
Identifies the type of a project, on which the mix aqua command is called.
Set the valuse inside Inject structure under project_type
Link to this section Types
Link to this section Functions
assert_not_in_flat_project(scaffold)
assert_not_in_flat_project(Aqua.Schema.Scaffold.t()) :: Aqua.Schema.Scaffold.t()
assert_not_in_flat_project(Aqua.Schema.Scaffold.t()) :: Aqua.Schema.Scaffold.t()
Sets Scaffold to invalid, if the value of project_type is :flat.
If the project_type value is anything else - pathes the Inject struct as is.
calculate_pathes(inject)
calculate_pathes(Aqua.Schema.Scaffold.t()) :: Aqua.Schema.Scaffold.t()
calculate_pathes(Aqua.Schema.Scaffold.t()) :: Aqua.Schema.Scaffold.t()
Calculate pathes for scaffolding project. Pathes for umbrella differs from pathes for flat project.
Function will populate fils-system root path for scaffolding project under :path key;
Calculation is preformed from value of :raw key inside Inject. We should be inside either umbrella or no application.
This function as the result either will populate structure with pathes, or invalidate the Inject with well-formed error, if path or Elixir's module name
from raw input are invalid for this type of a project and injection.
generate(scaffold)
generate_assigns(scaffold, args)
This function populate generic assigns, that will be used inside injected document
load_template(scaffold, template)
load_template(Aqua.Schema.Scaffold.t(), any()) :: Aqua.Schema.Scaffold.t()
load_template(Aqua.Schema.Scaffold.t(), any()) :: Aqua.Schema.Scaffold.t()
Loads LocalTemplate, and stores it inside :template key inside.
Populates errors, that appears during LocalTemplates loading from LocalTemplate struct into
Scaffold struct.
Can return either Scaffold struct with populated valid LocalTemplate under :template key,
or Inject with well-formed error under :valid? key.
set_project_type(scaffold)
set_project_type(inject :: Aqua.Schema.Scaffold.t()) :: Aqua.Schema.Scaffold.t()
set_project_type(inject :: Aqua.Schema.Scaffold.t()) :: Aqua.Schema.Scaffold.t()
Identifies the type of a project, on which the mix aqua command is called.
Set the valuse inside Inject structure under project_type.
Project structure can be:
- :none - we are not inside the project;
- :flat - we are inside flat [common] project;
- :umbrella - we are inside umbrella project;