0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

ES6 migration: core/server/helpers/asset.js (#9662)

refs #9628
This commit is contained in:
Lundin Matthews 2018-06-04 11:30:21 -05:00 committed by Katharina Irrgang
parent fdde9f7c5d
commit a993994d68

View file

@ -2,13 +2,13 @@
// Usage: `{{asset "css/screen.css"}}`, `{{asset "css/screen.css" ghost="true"}}`
//
// Returns the path to the specified asset. The ghost flag outputs the asset path for the Ghost admin
var proxy = require('./proxy'),
_ = require('lodash'),
const proxy = require('./proxy'),
get = require('lodash.get'),
getAssetUrl = proxy.metaData.getAssetUrl,
SafeString = proxy.SafeString;
module.exports = function asset(path, options) {
var hasMinFile = _.get(options, 'hash.hasMinFile');
const hasMinFile = get(options, 'hash.hasMinFile');
return new SafeString(
getAssetUrl(path, hasMinFile)