Recherche de code source du café et des méthodes SCSS
-
12-12-2019 - |
Question
Dans mon application SINATRA / PADRINO, j'ai
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
Je veux savoir, où je peux trouver des définitions de méthodes
La solution
Alors que @hugo a dit que vous pouvez (je prends un exemple de café) départ d'ici:
https://github.com/sinatra/ SINATRA / BLOB / MASTER / LIB / SINATRA / BASE.RB # L628
ALORS:
https://github.com/rtomayko/ Tilt / Blob / Master / Lib / Tilt / Coffee.Rb # L45
et enfin:
https://github.com/rtomayko/ Tilt / Blob / Master / Lib / Tilt / Coffee.Rb # L45
https://github.com/sstephenson/ Execjs / Blob / Master / Lib / Execjs / Runtime.RB # L43
Selon votre courage JS:
https://github.com/sstephenson/ Execjs / Blob / Master / Lib / Execjs / external_Runtime.rb # L46
Autres conseils
Habituellement, les auteurs GEM Placent des liens vers la page Source de Rubygems Page d'accueil
https://rubygems.org/gems/<gem_name>
Pour vos gemmes mentionnées, la source peut être trouvée
https://github.com/josh/ruby-coffee-script
et