Sha256: 95bce56965242e09daef25c2c48e49c2a287a828d276f08f2261e2c42e4f5fe9

Contents?: true

Size: 1.23 KB

Versions: 2

Compression:

Stored size: 1.23 KB

Contents

#!/usr/bin/env ruby

require 'rubygems'
require 'commander/import'

$:.unshift File.join(File.dirname(__FILE__), *%w{ .. lib })
require 'staticise'


program :name, 'staticise'
program :version, '0.0.1'
program :description, 'Static site generator using Haml and Coffeescript'

default_command :build

command :build do |c|
  c.syntax = 'staticise build'
  c.summary = 'Build all pages, js and css'
  c.description = 'Build all pages, js and css'
  c.example 'description', 'command example'
  c.option '--some-switch', 'Some switch that does something'
  c.action do |args, options|
    Staticise::Renderer.all
  end
end

command :init do |c|
  c.syntax = 'staticise init'
  c.summary = 'Initialize app, create initial folder structure'
  c.action do |args, options|
    Staticise::Renderer.init
  end
end

command :watch do |c|
  c.syntax = 'staticise watch [options]'
  c.summary = 'Start staticise watcher'
  c.option '--no-sass', 'do not include sass files'
  c.option '--no-less', 'do not include less files'
  c.option '--no-haml', 'do not include haml files'
  c.option '--no-coffee', 'do not include coffee files'

  c.action do |args, options|
    Staticise::Renderer.all

    watcher = Staticise::Watcher.new(options)
    watcher.start
  end
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
staticise-0.5.10 bin/staticise
staticise-0.5.9 bin/staticise