커피 및 SCSS 방법의 소스 코드를 검색합니다
-
12-12-2019 - |
문제
내 Sinatra / Padrino App에서
require 'sass'
require 'coffee-script'
# Routes to COFFEE-JS and SCSS-CSS
get '/javascripts/:name.js' do
content_type 'text/javascript', charset: 'utf-8'
coffee :"../../public/javascripts/coffee/#{params[:name]}"
end
get '/stylesheets/:name.css' do
content_type 'text/css', charset: 'utf-8'
scss :"../../public/stylesheets/scss/#{params[:name]}"
end
.
나는 방법 커피 및 scss 의 정의를 찾을 수있는 곳을 알고 싶습니다.이 메소드의 소스 코드를 배우고 싶습니다
해결책
@hugo가 당신이 할 수 있다고 말했습니다 (나는 커피 예제)에서 시작합니다 :
https://github.com/sinatra/ SINATRA / BLOB / MASTER / lib / sinatra / base.rb # l628
그런 다음 :
https://github.com/rtomayko/ 틸트 / 블로브 / 마스터 / lib / 틸트 / coffee.rb # l45
및 마지막으로 :
https://github.com/rtomayko/ 틸트 / 블로브 / 마스터 / lib / 틸트 / coffee.rb # l45
https://github.com/sstephenson/ EXECJS / BLOB / MASTER / lib / execjs / runtime.rb # l43
JS 런타임에 따라 :
https://github.com/sstephenson/ EXECJS / BLOB / MASTER / lib / execjs / external_runtime.rb # l46
다른 팁
일반적으로 GEM 작성자는 RubyGems 홈 페이지의 소스에 링크를 배치합니다
https://rubygems.org/gems/<gem_name>
.
언급 한 보석의 경우 소스를 찾을 수 있습니다
https://github.com/josh/ruby-coffee-script <./ P>
및