Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

41
crystal Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# 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`