什么是“//=需要引导/粘贴”;的符号?有没有使用它的咕哝工具

What is the "//= require bootstrap/affix" notation for? Is there any grunt tool that uses it?

本文关键字:有没有 符号 工具 什么 粘贴      更新时间:2023-09-26

最近我从bootstrap-sass存储库切换到bootstrap-sass-official,我注意到bootstrap.js文件中有一些不熟悉的东西,即:

//= require bootstrap/affix
//= require bootstrap/alert
//= require bootstrap/button
//= require bootstrap/carousel
//= require bootstrap/collapse
//= require bootstrap/dropdown
//= require bootstrap/tab
//= require bootstrap/transition
//= require bootstrap/scrollspy
//= require bootstrap/modal
//= require bootstrap/tooltip
//= require bootstrap/popover

我理解这只包括一个文件(bootstrap.js),告诉我们需要(导入)bootstrap目录中的部分。然而,这肯定不是本地Javascript的一部分,我在谷歌上找不到它是什么

有人能启发我,告诉我什么软件应该理解这个符号,并负责构建/获取部分代码吗?或者这只是一个简单的评论(如果是……为什么要为此创建一个单独的文件?)?

编辑:我用咕哝来建立我的资产。有没有使用这种符号的grunt工具,或者我只是忽略它并在布局中引用部分?

Loostro,这是Ruby on Rails想要的东西,可以按照特定的顺序编译资产。//=表示法让Sprockets知道要包含这些文件。您可以在这里了解有关Rails的这一部分(称为资产管道)的更多信息:http://guides.rubyonrails.org/asset_pipeline.html,或使用Hartl的完美介绍指南,点击此处:http://ruby.railstutorial.org/chapters/filling-in-the-layout#sec-sass_and_the_asset_pipeline

相关文章: