1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-05 13:05:59 +02:00
tldr/pages/common/crystal.md
Vitor Henrique c8f956319f
pages*: simplify page description (#12149)
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-02-14 21:25:13 +01:00

36 lines
751 B
Markdown

# crystal
> Manage Crystal source code.
> More information: <https://crystal-lang.org/reference/using_the_compiler>.
- Run a Crystal file:
`crystal {{path/to/file.cr}}`
- Compile a file and all dependencies to a single executable:
`crystal build {{path/to/file.cr}}`
- Read Crystal source code from the command line or `stdin`, and execute it:
`crystal eval '{{code}}'`
- Generate API documentation from inline docstrings in Crystal files:
`crystal docs`
- Compile and run a Crystal specification suite:
`crystal spec`
- Start a local interactive server for testing the language:
`crystal play`
- Create a project directory for a Crystal application:
`crystal init app {{application_name}}`
- Display all help options:
`crystal help`