remove mm-* binaries
This commit is contained in:
parent
935a0d6abe
commit
9b00ec1a13
4 changed files with 0 additions and 85 deletions
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
|
|
||||||
ENV['MM_ENV'] = "build"
|
|
||||||
|
|
||||||
# Require app
|
|
||||||
require File.join(File.dirname(__FILE__), "..", "lib", "middleman")
|
|
||||||
Middleman::Builder.start
|
|
27
bin/mm-init
27
bin/mm-init
|
@ -1,27 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
require File.join(File.dirname(File.dirname(__FILE__)), 'lib', 'middleman')
|
|
||||||
require "middleman/templates"
|
|
||||||
|
|
||||||
module Middleman
|
|
||||||
class Generator < ::Thor::Group
|
|
||||||
include Thor::Actions
|
|
||||||
|
|
||||||
argument :location, :type => :string, :desc => "New project location"
|
|
||||||
|
|
||||||
available_templates = Middleman::Templates.registered_names.join(", ")
|
|
||||||
class_option :template, :aliases => "-T", :default => "default", :desc => "Optionally use a pre-defined project template: #{available_templates}"
|
|
||||||
|
|
||||||
class_option :css_dir, :default => "stylesheets", :desc => 'The path to the css files'
|
|
||||||
class_option :js_dir, :default => "javascripts", :desc => 'The path to the javascript files'
|
|
||||||
class_option :images_dir, :default => "images", :desc => 'The path to the image files'
|
|
||||||
|
|
||||||
def create_project
|
|
||||||
key = options[:template].to_sym
|
|
||||||
key = :default unless Middleman::Templates.registered_templates.has_key?(key)
|
|
||||||
|
|
||||||
Middleman::Templates.registered_templates[key].start
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Middleman::Generator.start
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
|
|
||||||
`mv public source`
|
|
||||||
`cp -R views/* source/`
|
|
||||||
`rm -rf views`
|
|
|
@ -1,46 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
|
|
||||||
require "rubygems"
|
|
||||||
require "thor"
|
|
||||||
require "thor/group"
|
|
||||||
|
|
||||||
# Require Middleman
|
|
||||||
require File.join(File.dirname(__FILE__), '..', 'lib', 'middleman')
|
|
||||||
|
|
||||||
module Middleman
|
|
||||||
class GuardServer < ::Thor::Group
|
|
||||||
include Thor::Actions
|
|
||||||
|
|
||||||
class_option :environment, :aliases => "-e", :default => ENV['MM_ENV'] || ENV['RACK_ENV'] || 'development'
|
|
||||||
|
|
||||||
class_option :port, :aliases => "-p", :default => "4567"
|
|
||||||
class_option :"livereload-port", :default => "35729"
|
|
||||||
class_option :"livereload", :default => false, :type => :boolean
|
|
||||||
|
|
||||||
def start_guard
|
|
||||||
if !File.exists?("config.rb")
|
|
||||||
$stderr.puts "== Error: Could not find a Middleman project config, perhaps you are in the wrong folder?"
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
# If the old directories exists, use it, but issue warning
|
|
||||||
if File.exists?("views") || File.exists?("public")
|
|
||||||
$stderr.puts "== Error: The views and public folders are have been combined. Create a new 'source' folder, add the contents of views and public to it and then remove the empty views and public folders."
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
ENV['RACK_ENV'] = options[:environment]
|
|
||||||
|
|
||||||
livereload_options = {
|
|
||||||
:port => options[:"livereload-port"]
|
|
||||||
}
|
|
||||||
livereload_options = nil unless options[:"livereload"]
|
|
||||||
|
|
||||||
::Middleman::Guard.start({
|
|
||||||
:port => options[:port],
|
|
||||||
}, livereload_options)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Middleman::GuardServer.start
|
|
Loading…
Reference in a new issue