Projects
A project is a library, application, package, binary, tool, etc, that contains source files, test files, assets, resources, and more. A project must exist and be configured within a workspace.
Names
A project name (or identifier) is a unique resource for locating a project. The name is explicitly
configured within .moon/workspace.yml
, as a key within the
projects
setting, and can be written in camel/kebab/snake case.
Names support a-z
, A-Z
, 0-9
, _
, -
, /
, .
, and must start with a character.
Names are used heavily by configuration and the command line to link and reference everything. They're also a much easier concept for remembering projects than file system paths, and they typically can be written with less key strokes.
Lastly, a project name can be paired with a task name to create a target.
Aliases
Aliases are a secondary approach for naming projects, and can be used as a drop-in replacement for standard names. What this means is that an alias can also be used when configuring dependencies, or defining targets.
However, the difference between aliases and names is that aliases can not be explicit configured
in moon. Instead, they are specific to a project's primary programming language, and are inferred
based on that context (when enabled in settings). For example, a JavaScript or TypeScript project
will use the name
field from its package.json
as the alias.
Because of this, a project can either be referenced by its name or alias, or both. Choose the pattern that makes the most sense for your company or team!