CommandLine
Command
build
build
command builds a next project file or runs all next project files in a directory. It reads the project file and compiles the source files according to the project configuration. The project file is a YAML or JSON file that contains the project Configuration.
Example:
# build all .nextproj files in the current directory
next build
# build the example.nextproj file
next build example.nextproj
# build all .nextproj files in the example directory
next build example/
# build multiple project files or directories
next build example1.nextproj example2.nextproj example
tip
.nextproj is recommended for the Next project file.
grammar
grammar
command generates the default grammar for the next files.
Example:
next grammar # generate the default grammar to the standard output with YAML format
next grammar grammar.yaml # generate the default grammar with YAML format
next grammar grammar.yml # generate the default grammar with YAML format
next grammar grammar.json # generate the default grammar with JSON format
note
The default grammar is generated in YAML format if the file extension is not provided.
Currently, the supported file extensions are .json
, .yaml
, and .yml
(alias of .yaml
).
version
version
command prints the version of the next compiler. It prints the version of the next compiler and exits the program.
Example:
next version
Output:
next v0.0.4(main: 51864a35de7890d63bfd8acecdb62d20372ca963) built at 2024/09/27T22:58:21+0800 by go1.23.0