April 05, 2019
On Friday, 5 April 2019 at 12:46:18 UTC, Andre Pany wrote:
> On Friday, 5 April 2019 at 12:27:25 UTC, Comrad wrote:
>> [...]
>
> No problem:)
>
> Create a file sample.d with following content
>
> #!/usr/bin/env dub
> /+ dub.sdl:
>   name "sample"
>   versions "test"
> +/
> void main() {
> 	import std.stdio : writeln;
> 	writeln("Hello, World!");
> }
>
> You can start it with "dub sample" or if you add the executable flag with "./sample.d".
>
> With recent dub version you can name the file even without the .d extension and just start it with "./sample".
>
> Kind regards
> Andre

Also, in more recent versions of dub the "name" field got optional as well and will be automatically inferred if not set.
April 05, 2019
On 4/5/19 8:20 AM, Comrad wrote:
> This does work. But!!! The documentation have to be changed, because the recommended way to start the script is through `env` and it doesn't help at all.

Yes, these are conflicting. Can you please make the documentation change?
1 2
Next ›   Last »