You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Hamlã³ããã¿ã¼ã«ãªã£ã RubyKaigi 2015ã§ãHamlã¯é ããã¡ã³ãããã¦ãªãã®ã§ä½¿ããªãæ¹ããããã¨è¨ã£ãã¨ããããããèªåã§ã¡ã³ããã¦éãããã¨ãããã¨ã«ãªãã³ããã¿ã¼ã«ãªã£ã*1ã å½æãã2å¹´ãããªã®ã¯ãå½æã®Hamlã®ãªã¼ãã¼ããã¾ãã¢ã¯ãã£ãã§ã¯ãªããæè¿a_matsudaããããªã¼ãã¼ã«ãªã£ãããã Hamlã®Templeåã»é«éåãè¡ã£ã Templeã¨ããã®ã¯ããã³ãã¬ã¼ãã¨ã³ã¸ã³ããã¤ãã©ã¤ã³çã«æ§ç¯ããããã®ãã¬ã¼ã ã¯ã¼ã¯ã§ããã³ãã¬ã¼ãã¨ã³ã¸ã³ç¨ã®ä¸é表ç¾ã¨ãã®æé©åã¨ã³ã¸ã³ãæã¤ãå®è£ ãTempleãã¼ã¹ã«ããã¨ãSlimãHamlitã«ä½¿ããã¦ãããããªä¸é表ç¾ã使ã£ãæé©åãé©ç¨ãããããªãã ã³ããã権ãããã£ãã®ã§ãRubyKaigi 2015ã§ãã¼ã¸ãããªãã¨è¨ã£ã¦ããããããèªåã§ãã¼ã¸ããã³ã¼ãçæã¨attributeã®ã³ã³ãã¤ã«ãTe
slim-template/slimã®compiled benchã§ãªãªã¸ãã«ã®hamlã«æ¯ã¹8åé«éã«åä½ããhamlå®è£ ããªãªã¼ã¹ãã¾ããã github.com ãªãé«éãªHamlå®è£ ãä½ã£ãã®ã å人çã«hamlã®ã·ã³ã¿ãã¯ã¹ã®ã»ãã好ããªã®ã§ããhamlã¯é ãããslimã使ããã¿ãããªäººãæ¸ããããã£ãããã以åslimã®æ®åã«è²¢ç®ãããã ãã©ãæ°ãå¤ãã£ãã®ã§hamlãå¿æ´ãããã¨ã«ããã å®ã¯ä»ã«ãæ¢ã«eagletmt/famlã¨ããé«éãªHamlå®è£ ãåå¨ãã¦ãããã ãã©ãã³ããèµ°ããããslimããé ãã£ãã®ã§ãslimãæåããã¹ãåå®è£ ããã ã©ã®ãããHamlããéãã®ã èªåã®å®è£ ã«é½åã®ãããã³ããã¼ã¯ãä½ãã®ã¯ç°¡åãªã®ã§ãå ¬å¹³æ§ãæãããã«slim-template/slimã®compiled benchã¨åããã®ã使ãã誰ã§ãåãç°å¢ã使ããtravisã§
Haml (HTML Abstraction Markup Language) Haml is a markup language thatâs used to cleanly and simply describe the HTML of any web document, without the use of inline code. Haml functions as a replacement for inline page templating systems such as PHP, ERB, and ASP. However, Haml avoids the need for explicitly coding HTML into the template, because it is actually an abstract description of the HTML,
親æã«åãã§ããç¯å²ã§è¯ãã®ã§ã¿ãã§éçãµã¤ããä½ãã¨å¼·è¦ãããã®ã§ã90%åå¼·ã§ä»ã©ã(ã§ãããâ¦ï¼)ã®ããã³ãã¨ã³ãéçºã¨ãããä½é¨ãã¦ã¿ããã¨ä¸è¨æ§æã§ãã£ã¦ã¿ãã grunt?gulp?webpack????ã¨ããç¶æ³ã§ãåã§ä»ãªãgulpã§è¯ãããããï¼ã¨èããã®ã§ãã£ã¦ã¿ãã¬ãã«â¦ã¨ããã³ãåå¿è ã å¤ãªãã¨ãã£ã¦ãããå¤ãããæ¹ã ã£ããããã¨æãã®ã§ããµã«ãªãå¾ ã¡ãã¦ããã¾ãã ã§ããã㨠gulp sass 㧠sasså¤æãã¤ã¤ publish以ä¸ã¸é ç½® gulp haml 㧠hamlå¤æãã¤ã¤ publish以ä¸ã¸é ç½® gulp js 㧠browserify+es6å¤æãã¤ã¤ publish以ä¸ã¸é ç½® gulp image ã§ç»åæé©åãã¤ã¤ publish以ä¸ã¸é ç½® gulp build 㧠ä¸è¨å¤æç³»ä¸æ¬å®è¡ gulp deploy 㧠buildããå¾ã«S3ã«
2012å¹´ 4æ 1æ¥ ç¦å±±ã§ããHamlç¿å¾ã«ãã£ã¦ãHTMLãå¹ççã«æ¸ããã¨ãã§ãããããã¨ãããã¨ã§æã伸ã°ãã¦ã¿ã¾ããã 使ã£ããã®ã¨ãã¼ã¸ã§ã³ Mac OSX Lion 10.7.3 Cocoa Emacs 23.4 haml 3.1.4 haml-mode 3.0.15 Emacsä¸ã§ M-! haml 対象ãã¡ã¤ã« å¤æå¾ãã¡ã¤ã« ã¨ãããã¨ãå¯è½ã§ãããé¢åãªã®ã§ .hamlæ¡å¼µåã®ãã¡ã¤ã«ä¿åãããã¨åæã«.htmlãã¡ã¤ã«ãåºåãã¾ãã ã¾ããEmacsã«haml-modeãã¤ã³ã¹ãã¼ã«ãã¾ãã nex3 / haml-mode ã¿ã¼ããã«ãéãã以ä¸ãå ¥åãããã¹ã sudo gem install haml æºåå®äºï¼ ã»ã¼ãæãªã¼ãã³ã³ãã¤ã«è¨å® init.el(emacs.el)ã«ä»¥ä¸ãæ¸ãè¾¼ã¿ã¾ãã ;; Emacsã«hamlã³ãã³ãã®ãããã©ã«ããæãã
2012å¹´ 4æ 11æ¥ Hamlã¯HTMLãå¹ççã«çæããããã®è¨æ³ã§ãã ãããããã¨æã£ã¦ããæ¹ãå¤ãããªã®ã§ãããã¤ã¾ãã§ã·ã³ãã«ã«ã¾ã¨ãã¦ã¿ã¾ããã Hamlã使ããããã«ãã Macã®å ´å㯠ã¢ããªã±ã¼ã·ã§ã³ï¼ã¦ã¼ãã£ãªãã£ï¼ã¿ã¼ããã«ãéãã¾ãã éãã¦ããã®ä½ç½®ã«æ¬¡ã®ä¸è¡ãå ¥åãã¾ãã gem install haml å¦çãæ°åã»ã©ãããã¾ããã¿ã¼ããã«ã¯ãã®ã¾ã¾ã«ãã¦ãã ããã Hamlãã¡ã¤ã«ãHTMLã«å¤æãã ã¾ãã¯æ¸ããã³ã¼ããã©ã®ããã«HTMLã¨ãªãã®ã確èªã§ããããã«ãã¾ãããã 試ãã«ãã¹ã¯ãããã«test.hamlã¨ãããã¡ã¤ã«ãä½ãã¾ãã HamlãHTMLã«ãããããå ã»ã©ã®ã¿ã¼ããã«ãéãã¾ãããã¡ã¤ã«ãç½®ããé層ã¾ã§cdã§ç§»åãã¾ãã cd desktop ãããå ¥åãEnter(return)ãã¼ãæ¼ã㦠haml test.haml tes
ä¾ !!! XML !!! %html %head %meta{:"http-equiv"=>"Content-Type", :content=>"text/html", :charset=>"utf-8"} %title Hello, Haml! %body #main %h1 Hello Haml %div this is a sample haml. ã¿ã° (%) %html idæå®ãclassæå® (#, .) %div#main %p.title ã¿ã°ãçç¥ããã¨divã«ãªãã #main .title Hello å±æ§ ({}) %script{:src => "/javascripts/foo.js"} %input{:selected => true} æ¬å¼§å ã«ã¯Rubyã®ã³ã¼ããæ¸ãããHaml::Helpers ã®ã¡ã½ããã使ãã¨ï¼ %html{ html_attrs
Rails 3.2.13 + Bootstrap + Hamlã®ããã¸ã§ã¯ãä½æã®ããã¼ãä½æãã¾ããã
# Gemfile: group :development do gem 'erb2haml' end % rake haml:convert_erbs Looking for ERB files to convert to Haml... Converting: app/views/layouts/application.html.erb... Done! Converting: app/views/devise/unlocks/new.html.erb... Done! Converting: app/views/devise/sessions/new.html.erb... Done! Converting: app/views/devise/registrations/new.html.erb... Done! Converting: app/views/devise/regist
(2010-08-30: Rails 3.0.0ããªãªã¼ã¹ãããã®ã§ããã«ãããã¦æ´æ°ãgeneratoré¢é£ãå°ãå¤ãã£ã¦ã) ä¼ç¤¾ç¨ã®ãå°ç©Webã¢ããªãä½ãããã¨æãããã£ãããªã®ã§Ruby on Rails 3ã§mongoDB使ã£ã¦ã¿ããããªãã¨æããã¨ããããç°å¢ãä½ãã¨ããã¾ã§ã®ã¡ã¢ã Rails 3 ã®ã¤ã³ã¹ãã¼ã« ã¨ãããã Rails 3 ã®ã¤ã³ã¹ãã¼ã«ãBundlerã§å ¥ãããBundlerèªä½ã®ãã¼ã¸ã§ã³ã1.0以ä¸ã§ãªãã¨ãã¡ã¿ãããªãã§ãããããæªæºããå ¥ã£ã¦ããªãå ´åã«ã¯Bundlerã®ã¤ã³ã¹ãã¼ã«ããããã ããã¸ã§ã¯ãã®ããããã£ã¬ã¯ããªã¨ãªãã¨ãããä½æããããã«Gemfileãä½ãã $ mkdir ~/workspace/hoge_prj $ cd ~/workspace/hoge_prj Gemfile source 'http://rubygems
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}