Wrote DUB introduction in index page.#84
Conversation
✅ Deploy Preview for dub-registry ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
41f0475 to
90ae9f2
Compare
docs/index.md
Outdated
| DUB is a build tool similar to other modern languages build tools like Javascript's [npm](https://www.npmjs.com/) | ||
| and Rust's [cargo](https://crates.io/). | ||
|
|
||
| A file called `dub.sdl` (or `dub.json`) is used to configure a DUB project. |
There was a problem hiding this comment.
Technically, that is called the "recipe file"
There was a problem hiding this comment.
I would mention the 3 files that drive dub:
- Recipe file, per project;
- Selections file, or lock file, tied to a recipe file;
- Configuration file, which can be at project, user, or system scope;
There was a problem hiding this comment.
Configuration file refers to this one? https://dub.pm/dub-reference/settings/
There was a problem hiding this comment.
I've edited the text to mention all three files.
docs/index.md
Outdated
|
|
||
| A file called `dub.sdl` (or `dub.json`) is used to configure a DUB project. | ||
|
|
||
| > [SDL](https://sdlang.org/) is a "Simple Declarative Language" inspired by D's syntax. |
There was a problem hiding this comment.
I don't think it is inspired by D's syntax though
There was a problem hiding this comment.
Yes, SDL is an independent project (possibly, but I don't remember, implemented first in a language other than D). After various community members compared different alternatives to JSON, SDL stood out as the one most fitting Dub.
There was a problem hiding this comment.
Ah, I think I just guessed it :D. I will remove that comment then.
There was a problem hiding this comment.
I've changed this passage, let me know if it's ok now.
| [DUB Configurations](dub-reference/configurations.md) are used to create different variations of a project. | ||
|
|
||
| In the above example, all configurations include a dependency on `libasync` because that's declared at the top-level, | ||
| but only the `unittest` configuration includes the dependencies `tested` and `dshould`. |
There was a problem hiding this comment.
Note for yourself: There is a longstanding bug in dub and that is currently not the case. But we intend to fix it.
There was a problem hiding this comment.
Oh... but does the test lib actually get included in the compiled binaries?
|
Thanks for taking the time to do this! |
I had trouble understanding where DUB lies in comparison with other build tools as I was learning it, so I decided to write an introduction that would've really helped me (and others like me) understand it quickly.