mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
34 lines
623 B
Plaintext
34 lines
623 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# stack
|
|
|
|
> Manage Haskell projects.
|
|
> More information: <https://docs.haskellstack.org/en/stable/commands/>.
|
|
|
|
- Create a new package:
|
|
|
|
`stack new {{package}} {{template}}`
|
|
|
|
- Compile a package:
|
|
|
|
`stack build`
|
|
|
|
- Run tests inside a package:
|
|
|
|
`stack test`
|
|
|
|
- Compile a project and re-compile every time a file changes:
|
|
|
|
`stack build --file-watch`
|
|
|
|
- Compile a project and execute a command after compilation:
|
|
|
|
`stack build --exec "{{command}}"`
|
|
|
|
- Run a program and pass an argument to it:
|
|
|
|
`stack exec {{program}} -- {{argument}}`
|