Created
July 18, 2013 08:17
-
-
Save hungtatai/6027632 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|test.rb | |
|less | |
|-test.less |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@base: #f938ab; | |
.box-shadow(@style, @c) when (iscolor(@c)) { | |
box-shadow: @style @c; | |
-webkit-box-shadow: @style @c; | |
-moz-box-shadow: @style @c; | |
} | |
.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) { | |
.box-shadow(@style, rgba(0, 0, 0, @alpha)); | |
} | |
.box { | |
color: saturate(@base, 5%); | |
border-color: lighten(@base, 30%); | |
div { .box-shadow(0 0 5px, 30%) } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# %x{nvm use v0.10.12} | |
fireapp_path = "/Users/Honda/Develop/handlino/FireApp" | |
def scan_library( dir ) | |
Dir.new( dir ).entries.reject{|e| e =~ /^\./}.each do | subfolder| | |
lib_path = File.expand_path( File.join(dir, subfolder,'lib') ) | |
$LOAD_PATH.unshift( lib_path ) if File.exists?(lib_path) | |
end | |
end | |
scan_library("#{fireapp_path}/lib/ruby/common") | |
require "#{fireapp_path}/lib/ruby/common/execjs-1.4.0/lib/execjs" | |
require "#{fireapp_path}/lib/ruby/common/less-js-source-1.3.0/lib/less_js/source" | |
require "#{fireapp_path}/lib/ruby/common/less-js-0.1.1/lib/less_js" | |
require "#{fireapp_path}/src/less_compiler" | |
LessCompiler.compile_folder("./less", "./css") | |
#puts LessJs.compile(".class{ width: 1+1;}") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment