lib/jazzy/config.rb in jazzy-0.2.3 vs lib/jazzy/config.rb in jazzy-0.2.4

- old
+ new

@@ -30,10 +30,12 @@ attr_accessor :docset_path attr_accessor :source_directory attr_accessor :excluded_files attr_accessor :template_directory attr_accessor :swift_version + attr_accessor :assets_directory + attr_accessor :copyright def initialize PodspecDocumenter.configure(self, Dir['*.podspec{,.json}'].first) self.output = Pathname('docs') self.xcodebuild_arguments = [] @@ -47,10 +49,11 @@ self.skip_undocumented = false self.source_directory = Pathname.pwd self.excluded_files = [] self.template_directory = Pathname(__FILE__).parent + 'templates' self.swift_version = '1.2' + self.assets_directory = Pathname(__FILE__).parent + 'assets' end def podspec=(podspec) @podspec = PodspecDocumenter.configure(self, podspec) end @@ -178,22 +181,32 @@ opt.on('--swift-version VERSION') do |swift_version| config.swift_version = swift_version end + opt.on('--assets-directory DIRPATH', 'The directory that contains ' \ + 'the assets (CSS, JS, images) to use') do |assets_directory| + config.assets_directory = Pathname(assets_directory) + end + opt.on('--readme FILEPATH', 'The path to a markdown README file') do |readme| config.readme_path = Pathname(readme) end opt.on('-e', '--exclude file1,file2,…fileN', Array, 'Files to be excluded from documentation') do |files| - config.excluded_files = files + config.excluded_files = files.map { |f| File.expand_path(f) } end opt.on('-v', '--version', 'Print version number') do puts 'jazzy version: ' + Jazzy::VERSION exit + end + + opt.on('--copyright COPYRIGHT_MARKDOWN', 'copyright markdown ' \ + 'rendered at the bottom of the docs pages') do |copyright| + config.copyright = copyright end opt.on('-h', '--help', 'Print this help message') do puts opt exit