我正在将一个应用程序部署到Heroku,它会自动运行<style>
@media (orientation: landscape) {
body {
display: flex;
flex-direction: row;
overflow: hidden;
}
body > div {
flex: 1;
}
#map {
height: 100vh;
}
#right {
overflow-y: scroll;
}
}
@media (orientation: portrait) {
#map {
height: 50vh;
}
}
</style>
<body>
<div id="left">
<div id="map"></div>
</div>
<div id="right">
scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>scrollable<br>
</div>
</body>
<script>
let leafletMap = L.map('map').fitBounds([
[45, -63],
[40, -124]
]);
let normalLayer = L.tileLayer('//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
'attribution': '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
});
leafletMap.addLayer(normalLayer);
</script>
,但它为每个特定资产保留了最新的3个资产。我想更改它以保留最新的2甚至最新的1。
我知道我可以明确地这样做:rake assets:clean
,但我想知道是否可以将其设置为默认值吗?
源代码具有:
rake assets:clean[2]
但是我不知道在哪里或如何将desc "Remove old compiled assets"
task :clean, [:keep] => :environment do |t, args|
with_logger do
puts "cleaning!. argskeep=#{args.keep}, self.keep=#{self.keep}"
manifest.clean(Integer(args.keep || self.keep))
end
end
更改为其他默认值?理想情况下,我可以在配置文件中对其进行更改。
我欢迎任何指点。