Add 'cypm run' command
While developing a package with one or more executables it can be convenient to simply compile and run the executable directly without installing it first. Similar to other build tools (stack
, cabal
, cargo
, ...) it would be very convenient if we could have a cypm run
command for executing the package's main (as declared in the executable
/executables
). If the main is ambiguous, the tool could require passing the name of the executable as a second argument, i.e. cypm run [executable]
.
For example, suppose a package had the following executables in the package.json
:
{
"executables": [
{
"name": "kics2c",
"main": "KiCS2.Compile"
},
{
"name": "kics2i",
"main": "KiCS2.REPL"
}
]
}
Then cypm run kics2c
could be effectively equivalent to curry :load KiCS2.Compile :eval main :quit
. If only one executable exists, cypm run
would simply execute the (unambiguous) main.
Thoughts?