Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

182
Visualizações
What is "//= require" in a JavaScript file in a Rails app?

I'm looking at the source code of a Ruby on Rails app. Several of the JavaScript (*.js and *.es6) files in the source have one or more lines at the top of the file like:

//= require path/to/some_other_js_file

What are these lines called, and what are they doing?

(Potentially helpful SEO for folks who may be searching for a question like this, as I myself did prior to asking: slash slash equals require; double slash equals require)

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

These are "Sprockets directives," part of the Rails Asset Pipeline, part of how Rails performs combining and fingerprinting of JavaScript and CSS assets.

See https://guides.rubyonrails.org/asset_pipeline.html, in particular section 2.4 Manifest Files and Directives.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda