diff --git a/jekyll-docs/.gitignore b/jekyll-docs/.gitignore deleted file mode 100644 index 70c3dadc..00000000 --- a/jekyll-docs/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -jekyll -site -Gemfile.lock diff --git a/jekyll-docs/Gemfile b/jekyll-docs/Gemfile deleted file mode 100644 index 851fabc2..00000000 --- a/jekyll-docs/Gemfile +++ /dev/null @@ -1,2 +0,0 @@ -source 'https://rubygems.org' -gemspec diff --git a/jekyll-docs/Rakefile b/jekyll-docs/Rakefile deleted file mode 100644 index 770446b7..00000000 --- a/jekyll-docs/Rakefile +++ /dev/null @@ -1,60 +0,0 @@ -task :default => :init - -def name - "jekyll-docs".freeze -end - -def gemspec_file - "#{name}.gemspec" -end - -def gem_file - "#{name}-#{version}.gem" -end - -def version - ENV.fetch('JEKYLL_VERSION') -end - -task :init do - sh "git clone git://github.com/jekyll/jekyll.git jekyll" unless Dir.exist? "jekyll/.git" - Dir.chdir("jekyll") { sh "git checkout v#{version}" } - rm_rf "site" - cp_r "jekyll/site", "site" -end - -task :teardown do - rm_rf "site" - rm_rf "jekyll" -end - -############################################################################# -# -# Packaging tasks -# -############################################################################# - -desc "Release #{name} v#{version}" -task :release => :build do - unless `git branch` =~ /^\* master$/ - puts "You must be on the master branch to release!" - exit! - end - unless `git diff`.empty? - puts "We cannot proceed with uncommitted changes!" - exit! - end - sh "gem push pkg/#{name}-#{version}.gem" -end - -desc "Build #{name} v#{version} into pkg/" -task :build => :init do - mkdir_p "pkg" - sh "gem build #{gemspec_file}" - sh "mv #{gem_file} pkg" -end - -desc "Install #{name} v#{version} into your gem folder." -task :install => :build do - sh "gem install -l pkg/#{gem_file}" -end diff --git a/jekyll-docs/jekyll-docs.gemspec b/jekyll-docs/jekyll-docs.gemspec deleted file mode 100644 index 11699172..00000000 --- a/jekyll-docs/jekyll-docs.gemspec +++ /dev/null @@ -1,19 +0,0 @@ -# coding: utf-8 - -Gem::Specification.new do |spec| - spec.name = 'jekyll-docs' - spec.version = ENV.fetch('JEKYLL_VERSION') - spec.authors = ['Parker Moore'] - spec.email = ['parkrmoore@gmail.com'] - spec.summary = %q{Offline usage documentation for Jekyll.} - spec.homepage = 'http://jekyllrb.com' - spec.license = 'MIT' - - spec.files = Dir['**/*'].grep(%r{^(lib|site)/}) - spec.require_paths = ['lib'] - - spec.add_dependency 'jekyll', ENV.fetch('JEKYLL_VERSION') - - spec.add_development_dependency 'bundler', '~> 1.7' - spec.add_development_dependency 'rake', '~> 10.0' -end diff --git a/jekyll-docs/lib/jekyll-docs.rb b/jekyll-docs/lib/jekyll-docs.rb deleted file mode 100644 index 8e62f3de..00000000 --- a/jekyll-docs/lib/jekyll-docs.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'rubygems' -require 'jekyll' -require 'tmpdir' - -module JekyllDocs - class DocsCommand < Jekyll::Command - class << self - def init_with_program(prog) - prog.command(:docs) do |cmd| - cmd.description "Start a local server for the Jekyll documentation" - cmd.syntax "docs [options]" - cmd.alias :d - - cmd.option "port", "-P", "--port", "Port to listen on." - - cmd.action do |_, opts| - JekyllDocs::DocsCommand.process(opts) - end - end - end - - def process(opts) - Dir.mktmpdir do |dest_dir| - options = opts.merge({ - "serving" => true, - "watch" => false, - "config" => File.expand_path("../../site/_config.yml", __FILE__), - "source" => File.expand_path("../../site", __FILE__), - "destination" => dest_dir - }) - Jekyll::Commands::Build.process(options) - Jekyll::Commands::Serve.process(options) - end - end - end - end -end