mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 20:39:35 +00:00
756 B
756 B
dcr init/new
dcr new <name>
Creates a new project directory and initializes it.
dcr new hello
Behavior:
- Validates arguments (
<name>is required, only one name is allowed). - Creates
<name>/. - Creates
<name>/dcr.toml. - Sets
package.name = "<name>". - Creates
<name>/src/main.cwith a Hello World template.
Errors:
- Missing project name.
- Extra arguments.
- Target directory already exists.
dcr init
Initializes DCR in the current directory.
dcr init
Behavior:
- Requires current directory to be empty.
- Creates
dcr.toml. - Sets
package.namefrom the current directory name. - Creates
src/main.c.
Errors:
- Any arguments are treated as invalid.
- Non-empty directory is rejected.