0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-06 22:40:26 -05:00

Register entry partial even if custom template is provided

This commit is contained in:
Miguel Mejias 2016-08-10 11:52:21 +02:00
parent d8f2d95f92
commit 7b4c105046

View file

@ -33,11 +33,12 @@ module.exports = function(config, auth, storage) {
Search.configureStorage(storage) Search.configureStorage(storage)
Handlebars.registerPartial('entry', fs.readFileSync(require.resolve('./GUI/entry.hbs'), 'utf8'))
if(config.web && config.web.template) { if(config.web && config.web.template) {
var template = Handlebars.compile(fs.readFileSync(config.web.template, 'utf8')); var template = Handlebars.compile(fs.readFileSync(config.web.template, 'utf8'));
} }
else { else {
Handlebars.registerPartial('entry', fs.readFileSync(require.resolve('./GUI/entry.hbs'), 'utf8'))
var template = Handlebars.compile(fs.readFileSync(require.resolve('./GUI/index.hbs'), 'utf8')) var template = Handlebars.compile(fs.readFileSync(require.resolve('./GUI/index.hbs'), 'utf8'))
} }
app.get('/', function(req, res, next) { app.get('/', function(req, res, next) {
@ -153,4 +154,3 @@ module.exports = function(config, auth, storage) {
}) })
return app return app
} }