1#
2#
3#            Nim's Runtime Library
4#        (c) Copyright 2012 Andreas Rumpf
5#
6#    See the file "copying.txt", included in this
7#    distribution, for details about the copyright.
8#
9
10when defined(nimdoc) and isMainModule:
11  from std/compileSettings import nil
12  when compileSettings.querySetting(compileSettings.SingleValueSetting.projectFull) == currentSourcePath:
13    ## This is an include file that simply imports common modules for your convenience.
14    runnableExamples:
15      include std/prelude
16        # same as:
17        # import std/[os, strutils, times, parseutils, hashes, tables, sets, sequtils, parseopt]
18      let x = 1
19      assert "foo $# $#" % [$x, "bar"] == "foo 1 bar"
20      assert toSeq(1..3) == @[1, 2, 3]
21      when not defined(js) or defined(nodejs):
22        assert getCurrentDir().len > 0
23        assert ($now()).startsWith "20"
24
25  # xxx `nim doc -b:js -d:nodejs --doccmd:-d:nodejs lib/pure/prelude.nim` fails for some reason
26  # specific to `nim doc`, but the code otherwise works with nodejs.
27
28import std/[os, strutils, times, parseutils, hashes, tables, sets, sequtils, parseopt, strformat]
29