Sha256: 68d53f9026c5954c5413659ba75894377f269655f90eee8e5a82ff1f9e58f728

Contents?: true

Size: 824 Bytes

Versions: 33

Compression:

Stored size: 824 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'
require 'templater'

module Generators
  extend Templater::Manifold
  desc "Generator for streamlining staticmatic"

  class NewSite < Templater::Generator
    desc "Creates a new staticmatic scaffold."
    first_argument :location, :required => true, :desc => "Project location"

    def destination_root
      File.expand_path(location)
    end

    def self.source_root
      File.join(File.dirname(__FILE__), '..', 'lib', 'middleman', 'template')
    end
    
    file :init, "init.rb"
    glob! :views
    glob! :public
    empty_directory :stylesheets, "public/stylesheets"
    empty_directory :javascripts, "public/javascripts"
    empty_directory :images,      "public/images"
  end

  add :setup, NewSite
end

Generators.run_cli(Dir.pwd, 'mm-init', 1, %w(setup).concat(ARGV))

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
tdreyno-middleman-0.2.5 bin/mm-init
tdreyno-middleman-0.2.6 bin/mm-init
tdreyno-middleman-0.2.7 bin/mm-init
tdreyno-middleman-0.2.8 bin/mm-init
tdreyno-middleman-0.2.9 bin/mm-init
tdreyno-middleman-0.3.0 bin/mm-init
tdreyno-middleman-0.3.1 bin/mm-init
tdreyno-middleman-0.3.10 bin/mm-init
tdreyno-middleman-0.3.2 bin/mm-init
tdreyno-middleman-0.3.3 bin/mm-init
tdreyno-middleman-0.3.4 bin/mm-init
tdreyno-middleman-0.3.7 bin/mm-init
tdreyno-middleman-0.3.8 bin/mm-init
tdreyno-middleman-0.4.1 bin/mm-init
middleman-0.4.2 bin/mm-init
middleman-0.3.6 bin/mm-init
middleman-0.3.7 bin/mm-init
middleman-0.3.8 bin/mm-init
middleman-0.3.9 bin/mm-init
middleman-0.3.10 bin/mm-init