Skip to content

Instantly share code, notes, and snippets.

@stisa
Created May 10, 2017 16:55
Show Gist options
  • Save stisa/09474a952a420448778685507d3fbd51 to your computer and use it in GitHub Desktop.
Save stisa/09474a952a420448778685507d3fbd51 to your computer and use it in GitHub Desktop.

First suggestion:

src/
  <pkgname>.nim
tests/
docs/
<pkgname>.nimble # with srcDir = "src"

library with single module

<pkgname>.nim
<pkgname>.nimble # with skipDirs = @["tests","docs"]
tests/
docs/

library with multiple modules

<pkgname>/
  private/ # optional
    priv1.nim
    priv2.nim
  module1.nim
  module2.nim
<pkgname>.nimble # with skipDirs = @["tests","docs"]
tests/
docs/

binary

<pkgname>.nim
<pkgname>.nimble # with bin = @["<pkgname>"]

hybrid

<pkgname>pkg/
  private/ # optional
    priv1.nim
    priv2.nim
  module1.nim
  module2.nim
<pkgname>.nim
<pkgname>.nimble # with bin = @["<pkgname>"]

bonus: what I do:

src/
  <pkgname>.nim
  <pkgname>/
    private/ # optional
      priv1.nim
      priv2.nim
    module1.nim
    module2.nim
<pkgname>.nimble # with srcDir = "src"
tests/
docs/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment