cjpm init — Create a Project
The cjpm init command is used to initialize a new Cangjie project. It creates a standard project structure and configuration files.
After executing cjpm init, the following directory structure is generated: a cjpm.toml configuration file, a src/ source directory, and a default src/main.cj entry file. cjpm.toml is the core configuration file for the project, used to define project name, version, dependencies, and other information.
The configuration file must contain a [package] section, where name is the module name, version is the module version number, and output-type specifies the compilation artifact type (e.g., executable for executable files).
[package] and [workspace] fields cannot coexist in the same cjpm.toml file. Use [package] for single modules and [workspace] for multi-module projects.Check the comments in the code to understand the typical configuration format of cjpm.toml. Then try running the code to see the output after project initialization.