Sha256: 3323c7219f7f41030beb87743ff75f3d5dea82615b1137cf36ab8d051ee45eeb

Contents?: true

Size: 774 Bytes

Versions: 4

Compression:

Stored size: 774 Bytes

Contents

#!/usr/bin/env ruby

require File.dirname(__FILE__) + '/../lib/staticmatic'

command = ARGV[0]
directory = ARGV[1]

if !command || !directory
  puts "Usage: #{$0} <build|setup|preview> <directory>"
  exit
end

$:.push File.join(directory, "lib")

configuration = StaticMatic::Configuration.new

config_file = File.join(directory, "config", "site.rb")

if !File.exists?(config_file)
  config_file = File.join(directory, "src", "configuration.rb")
  
  if File.exists?(config_file)
    puts "DEPRECATION: #{directory}/src/configuration.rb will be moved to #{directory}/config/site.rb in 0.12.0"
  end
end

if File.exists?(config_file)
  config = File.read(config_file)
  eval(config)
end

staticmatic = StaticMatic::Base.new(directory, configuration)
staticmatic.run(command)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
staticmatic-0.11.0.alpha.5 bin/staticmatic
staticmatic-0.11.0.alpha.4 bin/staticmatic
staticmatic-0.11.0.alpha.3 bin/staticmatic
staticmatic-0.11.0.alpha.1 bin/staticmatic