One of the best things about Node _package.json_ is adding abbreviations for larger scripts.
Reading a about it, Deno users have implemented this by adding shorthand commands directly through the powershell configuration.
A nice feature could be the implementation of an optional _package.json_ equivalent called
_deno-config.json_ where you can configure your _deno run
I think this goes back to the debatable aspect of if Deno should designate filenames with special meanings. This was one of the initial things that I believe we were avoiding. If we were really to implement this, we would probably want explicit filename provided to a corresponding flag.
Ok! Didn麓t understood this part of the philosophy of the project.
I coded a little workaround to provide a similar feature using the subprocess example provided in the documentation. The workaround is creating a custom _index.ts_ file that executes a process depending on its input arguments:
So I could be doing something like this:
deno run --allow-run index.ts start
deno run --allow-run index.ts test
maybe an additional powershell alias should be necessary to save the "deno run --allow-run" part.
I am thinking better this as a third party library instead of a core feature.
@dllmkdir #5255 discusses this concept. You might be interested in https://github.com/denoland/deno/issues/5255#issuecomment-628521509
@dllmkdir #5255 discusses this concept. You might be interested in #5255 (comment)
I looked into it and it seems fine :) And also it tackles another issues from the tsconfig.json.
Thanks for the recommendation.
Also I found another repo addressing the feature
https://github.com/BentoumiTech/denox
Just a matter of taste, but I see denox more homogeneous as an executable command
Just wanted to say that in 1.0.0-beta.4 the CLI has changed, you've probably seen the old one 馃檪