1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/stack.md

29 lines
523 B
Markdown
Raw Normal View History

2017-10-01 19:53:11 +02:00
# stack
> Manage Haskell projects.
> More information: <https://github.com/commercialhaskell/stack>.
2017-10-01 19:53:11 +02:00
2019-11-25 01:38:35 +05:30
- Create a new package:
2017-10-01 19:53:11 +02:00
`stack new {{package}} {{template}}`
2017-10-01 19:53:11 +02:00
2019-11-25 01:38:35 +05:30
- Compile a package:
2017-10-01 19:53:11 +02:00
`stack build`
2019-11-25 01:38:35 +05:30
- Run tests inside a package:
2017-10-01 19:53:11 +02:00
`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}}"`
2017-12-19 19:01:07 +07:00
- Run a program and pass an argument to it:
`stack exec {{program}} -- {{argument}}`