This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map $sent_http_content_type $expires { | |
default off; | |
text/html epoch; | |
text/css max; | |
application/javascript max; | |
~image/ max; | |
font/ttf max; | |
font/opentype max; | |
application/font-woff max; | |
font/woff2 max; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default (fileInfo, api) => { | |
const j = api.jscodeshift; | |
const root = j(fileInfo.source); | |
let specifiers = []; | |
root | |
.find(j.ImportDeclaration, isLodashImport) | |
.forEach((path) => specifiers.push(...path.node.specifiers.map((specifier) => specifier.local.name))) | |
.remove(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module WillPaginateHelper | |
class StringLinkRenderer < WillPaginate::ActionView::LinkRenderer | |
protected | |
def url(page) | |
@base_url_params ||= begin | |
url_params = merge_get_params(default_url_params) | |
url_params[:only_path] = true | |
merge_optional_params(url_params) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let assets = require('../../public/assets.json'); | |
module.exports = function (swig) { | |
swig.setTag('asset', _parse, _compile, false, true); | |
}; | |
let _parse = function (str, line, parser) { | |
parser.on('*', function (token) { | |
let match = token.match.match(/^["'](.*?)["']$/); | |
let assetPath = match ? match[1] : null; |