gem “easy-html-creator”

yes …we are web developer ….and sometimes not …and we are also: developer …we are lazy, right ๐Ÿ˜‰

…so it was a good thing for Dennis and me to write simple server and generator in ruby, to have all the benefits from haml templating, sass css processor, coffee script generator and bootstrap

we call it easy-html-creator and packed it into a ruby gem ๐Ÿ™‚

%html{lang: 'de'}
    = render_partial '_metadata'
    = stylesheet_link_tag ''
    = javascript_include_tag ''
    = javascript_include_tag ''
    /[if lt IE 9]
      = javascript_include_tag ''
      = javascript_include_tag ''
        var ltie9 = true

  %body{class: body_class}
    = render_partial '_header'
      we are so laaaazy
      = yield
    = render_partial '_footer'
    = link_to 'it`s a gem now', '', class: 'gem-link so-lazy'

…yes it is a simple stand alone server, you start with “startServer”, which is serving and generating your output files each time you request it from a browser

@import "bootstrap/variables"
@import "bootstrap/mixins"
@import "dev_root/shared/sass/css3"

$image-url: '../images'
$border-color: #dedede

input, textarea, a, object, embed, button, button:focus
  outline: 0

html, body
  margin: 0
  padding: 0
  height: 100%

    +transition(all, 0.3s)

…and ruby is very fast on its own …we added some loading magic for helper and public content and overrode some active_support methods …and that’s it

module ActivesupportOverride
  def stylesheet_link_tag(path, media='screen')
    '<link href="'+path_to_css(path)+'" media="'+media+'" rel="stylesheet" type="text/css" />'

  def javascript_include_tag(path)
    '<script src="'+path_to_js(path)+'"></script>'

  def path_to_css(path)
    return path if external_path?(path)

  def path_to_js(path)
    return path if external_path? path

  def path_to_image(path)
    return path if external_path? path

  def external_path? path
    path.start_with?('//') || path.start_with?('http')

…now we are producing static html, css and javascript mostly the rails way …by having the performance of ruby ๐Ÿ™‚



Bildschirmfoto 2014-11-10 um 22.09.00