Tag: sinatra assetpack

如何让Twitter Bootstrap的Less文件与Sinatra AssetPack一起使用?

我试图让Bootstrap的Less文件与Sinatra AssetPack一起使用,但我得到的解析器错误更少。 这些错误让我相信通过bootstrap.less导入的文件越少,彼此之间就无法识别。 我有一个app.rb文件: require ‘sinatra/base’ require ‘sinatra/assetpack’ class App < Sinatra::Base set :root, File.dirname(__FILE__) register Sinatra::AssetPack assets do css :bootstrap, [ '/css/bootstrap.css' ] end get '/' do erb :index end # start the server if ruby file executed directly run! if app_file == $0 end 我已将所有Bootstrap less文件复制到/app/css目录并修改了bootstrap.less,以便每个@import语句以.css而不是.less结尾(但实际的文件扩展名没有更改)。 我还把一切都放在了Github上: https : //github.com/elevine/sinatra-assetpack-bootstrap 这是我得到的一个错误的堆栈跟踪的前半部分: Less::ParseError – […]