dub run subPackage by default

Andre Pany andre at s-e-a-p.de
Wed Sep 2 04:20:57 UTC 2020

On Tuesday, 1 September 2020 at 19:38:39 UTC, ParticlePeter wrote:
> On Tuesday, 1 September 2020 at 14:45:43 UTC, Andre Pany wrote:
>> On Tuesday, 1 September 2020 at 11:45:34 UTC, ParticlePeter 
>> wrote:
> [snip]
>> I have a enhancement for dub in my mind, which would also 
>> solve your issue. Similiar to setup.py in python you would be 
>> able to define an entry point in dub.json.
>> "entryPoints": {"foo":"subPackageName"}
>> Command `dub install mypackage` would create a batch file/bash 
>> script with name foo containing the command `dub run 
>> mypackage:subPackageName -- %*`.
>> Unfortunately I do not have any time to work on this.
>> Kind regards
>> Andre
> So, I take it that such a feature does not exist already.
> Your suggestion sounds nice, but why do you think it would be 
> necessary to go through a batch file or script? I think it 
> should be possible from within dub, to feed the chosen compiler 
> backend with the proper commands to either build or run the 
> appropriate entryPoint.
> - PP

The idea is, you add the folder containing the bash / batch files 
to your PATH environment variable. By executing e.g. `dub install 
dscanner` you can now execute in your shell/terminal `dscanner`.

Kind regards

More information about the Digitalmars-d-learn mailing list