Project

dressmaker

0.0
No commit activity in last 3 years
No release in over 3 years
Application templating in ruby. Define beautiful patterns and cut them out.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Dressmaker¶ ↑

Beautiful templating¶ ↑

I wanted to do really simple application templating, and found Rubigen and Thor were both tied to a command-line interface paradigm, whereas I really just wanted to execute this stuff programmatically. I also wanted application templates to be entirely self-contained.

Usage¶ ↑

Inside your application

require 'dressmaker'

maker = Dressmaker.new('my-template', 'my-source')
maker.generate

And you’re done! If you need to pass in options at generate time, simply pass generate some options.

maker.generate(:database => 'mysql')

Inside the template directory is a file, called Pattern. Here is a typical Pattern:

desc "make executable"
directory.matches('/bin') do |dir|
  dir.all { |f|
    f.make_executable!
  }
end

This would make everything inside bin executable.

Caution!¶ ↑

Everything here is subject to change. This is just an egg of an idea.