On Monday, 8 June 2020 at 11:09:01 UTC, Heromyth wrote:
On Wednesday, 3 June 2020 at 08:11:55 UTC, Andre Pany wrote:
On Wednesday, 3 June 2020 at 05:11:47 UTC, zoujiaqing wrote:
Look this:
https://github.com/huntlabs/hunt-framework/wiki/Quick-Start
By having a dub sub package `init-exec` in huntlabs dub
package,
a dub user can just execute `dub init -n mypackage -t
hunt-framework`
to create a skeleton, with source code provided by you.
See example here:
https://github.com/dlang/dub/blob/master/test/issue1651-custom-dub-init-type/custom-dub-init-dubpackage-1.0.1.zip?raw=true
Kind regards
André
I got a failed test. Here is the log, and I'm not sure what's
wrong with this:
➜ ~ cd dlang/dub-demo
➜ dub-demo pwd
/Users/putao/dlang/dub-demo
➜ dub-demo ll custom-dub-init
total 8
-rw-rw-r--@ 1 putao staff 123B 3 9 2019 dub.json
drwxrwxr-x@ 4 putao staff 128B 3 10 2019 init-exec
drwxrwxr-x@ 3 putao staff 96B 3 10 2019 source
➜ dub-demo dub init -n SimpleDemo -t
custom-dub-init-dubpackage --skip-registry=all
--registry=file:///Users/putao/dlang/dub-demo/custom-dub-init
-- --foo=bar
Couldn't find package: custom-dub-init-dubpackage.
The dub package registry of type `file` works differently. You
specify here a folder containing dub packages as zip file.
In your example you can instead use dub add-local command to
register local folder `custom-dub-init`. See
https://dub.pm/commandline.html#add-local
Then your command is just `dub init -n SimpleDemo -t
custom-dub-init-dubpackage -- --foo=bar`
Kind regards
Andre