From 9bc4c2aca262d60019fdb06fad6e336a40afea82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Fri, 8 Sep 2017 19:03:01 +0200 Subject: [PATCH] Change default output directory to ./docs --- src/compiler/crystal/command/docs.cr | 2 +- src/compiler/crystal/tools/doc/generator.cr | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/crystal/command/docs.cr b/src/compiler/crystal/command/docs.cr index 245128ca703f..237e6c956a49 100644 --- a/src/compiler/crystal/command/docs.cr +++ b/src/compiler/crystal/command/docs.cr @@ -5,7 +5,7 @@ class Crystal::Command private def docs - output_directory = "./doc" + output_directory = "./docs" OptionParser.parse(options) do |opts| opts.banner = "Usage: crystal docs [options]\n\nOptions:" diff --git a/src/compiler/crystal/tools/doc/generator.cr b/src/compiler/crystal/tools/doc/generator.cr index d4c576d4a368..795fa0644ec0 100644 --- a/src/compiler/crystal/tools/doc/generator.cr +++ b/src/compiler/crystal/tools/doc/generator.cr @@ -28,8 +28,8 @@ class Crystal::Doc::Generator }, } - def initialize(@program : Program, @included_dirs : Array(String), @dir = "./doc") - @base_dir = `pwd`.chomp + def initialize(@program : Program, @included_dirs : Array(String), @dir) + @base_dir = Dir.current @types = {} of Crystal::Type => Doc::Type @repo_name = "" @is_crystal_repo = false