View Source mix magma.prompt.gen (Magma v0.2.0)

A Mix task for generating Magma artefact prompt documents and custom prompt documents.

This Mix task is used to create either a custom Magma prompt document or an artefact prompt document. The task requires different arguments depending on the type of document to be created.

For a custom prompt document, a single argument representing the name of the prompt is required.

$ mix magma.prompt.gen "Prompt for something"

For an artefact prompt document, two arguments are needed: the first being the name of a concept and the second being the artefact type. The artefact type should be the last part of an Magma.Artefacts.X artefact type module, e.g. ModuleDoc or Readme.

$ mix magma.prompt.gen "Some.Module" ModuleDoc

Note that, by default, all artefact prompts of a concept (according to its matter type) are already created when a concept document is created. Therefore, it's usually not necessary to use this task for generating artefact prompt documents. If you only want to update an existing artefact prompt, you can use the Mix.Tasks.Magma.Prompt.Update Mix task instead.

Command line options

  • --force - When set, this option allows the task to overwrite existing documents without asking for permission first.

Summary

Functions

Callback implementation for Mix.Task.run/1.

Functions

Callback implementation for Mix.Task.run/1.