Closed jordwalke closed 7 years ago
I think that the current esy CMD
behaviour is a better building block for more complex workflows. It allows ad-hoc command execution easily while "named binaries" can be implemented by just placing a script which calls into esy
with a given command:
#!/bin/bash
exec esy some-executable
That said I'm totally biased against npm scripts approach as I think managing code inside a JSON file is just plain wrong. I think current esy CMD
is superior.
Okay, that's a good point, I'll try out your suggested approach for a while.
Sounds good.
What do people think about the following feature:
Could call the script named
scriptName
, stored in the"scripts"
section ofpackage.json
. This would be similar tonpm run scriptName
, but it would construct an environment fromesy
(as if you were building that package using script namescriptName
).Yarn also has a similar feature - the only difference being that we would want to construct the environment according to
esy
's approach.The way I think about
"scripts"
, in this case, is that they are like named binaries placed in the path ofesy
commands executed in that sandbox. I imagine if for every script name, there was an executable by that same name created implicitly in the directory that you execute esy commands.