Re: How to organize a project with local scripts in subdirectories using dub?

2019-12-11 Thread Pavel Shkadzko via Digitalmars-d-learn
On Wednesday, 11 December 2019 at 16:06:30 UTC, drug wrote: Add to dub.json: "targetType": "executable" and it will build executable. Or rename evaluator.d to app.d It is confused that there is no app.d so it thinks that you build a library. I added "targetType" and now everything works

Re: How to organize a project with local scripts in subdirectories using dub?

2019-12-11 Thread drug via Digitalmars-d-learn
On 12/11/19 6:52 PM, Pavel Shkadzko wrote: It works like this, yes. However, by default it builds a "library" while I want to run "evaluator" as a script which uses other scripts by calling their functions. Doing: dub --compiler=ldc2 --single evaluator.d // throws an error

Re: How to organize a project with local scripts in subdirectories using dub?

2019-12-11 Thread Pavel Shkadzko via Digitalmars-d-learn
On Wednesday, 11 December 2019 at 13:00:32 UTC, drug wrote: I would restructure your folders this way: my_proj/ source/ script_1/runme_1.d script_2/runme_2.d evaluator.d then using `dub --compiler=ldc2` It works like this, yes. However, by default it builds a

Re: How to organize a project with local scripts in subdirectories using dub?

2019-12-11 Thread drug via Digitalmars-d-learn
On 12/11/19 2:18 PM, Pavel Shkadzko wrote: I have the following project structure. my_proj/     script_1/runme_1.d     script_2/runme_2.d     evaluator.d The project has a library dependency: "dependencies": {     "mir": "~>3.2.0", }, The "evaluator.d" script contains some general

How to organize a project with local scripts in subdirectories using dub?

2019-12-11 Thread Pavel Shkadzko via Digitalmars-d-learn
I have the following project structure. my_proj/ script_1/runme_1.d script_2/runme_2.d evaluator.d The project has a library dependency: "dependencies": { "mir": "~>3.2.0", }, The "evaluator.d" script contains some general functions that convert dataset and pass it to