How to build an specific stack executable file, ie. those specified in projectname.cabal
, like:
executable executable-name
hs-source-dirs: tools
main-is: ExecutableModule.hs
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
build-depends: base
, hsass
, hlibsass
I would need to compile executable-name
and no other. It would be something like:
stack build --executable executable-name
Stack uses a component based lookup, e.g.
stack build packagename:component-type:component-name
So if your package is called "foo", and your executable is called "bar", you can use
stack build foo:exe:bar
However, if the component-name is unique, you can drop the package's name and the component type. So if your executable is called "exectuable-name", it's
stack build :executable-name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With