Ghost/core/server/helpers/utils.js
Hannah Wolfe 2c6d43a0c0 Refactor helpers & tests into individual files
no issue

- Split theme helpers into individual files for each
- Do the same for tests
- Have utils to share some things between them
- Move assetHash onto config
2014-10-14 22:52:40 +02:00

23 lines
600 B
JavaScript

var _ = require('lodash'),
utils;
utils = {
assetTemplate: _.template('<%= source %>?v=<%= version %>'),
linkTemplate: _.template('<a href="<%= url %>"><%= text %></a>'),
scriptTemplate: _.template('<script src="<%= source %>?v=<%= version %>"></script>'),
isProduction: process.env.NODE_ENV === 'production',
scriptFiles: {
production: [
'vendor.min.js',
'ghost.min.js'
],
development: [
'vendor-dev.js',
'templates-dev.js',
'ghost-dev.js'
]
}
};
module.exports = utils;