From 715ffcfbf251b157183b687d041ea12601673b29 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Mon, 18 Jul 2016 16:24:48 +0100 Subject: [PATCH] changed ordering on static assets path, just tidying. --- .../infrastructure/ExpressLocals.coffee | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/services/web/app/coffee/infrastructure/ExpressLocals.coffee b/services/web/app/coffee/infrastructure/ExpressLocals.coffee index ce5bf50b87..56de842052 100644 --- a/services/web/app/coffee/infrastructure/ExpressLocals.coffee +++ b/services/web/app/coffee/infrastructure/ExpressLocals.coffee @@ -10,6 +10,10 @@ Modules = require "./Modules" fingerprints = {} Path = require 'path' + + +imgPath = "/img/" +cssPath = "/stylesheets/" jsPath = if Settings.useMinifiedJs "/minjs/" @@ -17,14 +21,6 @@ jsPath = "/js/" -imgPath = "/img/" -cssPath = "/stylesheets/" - -if Settings.cdn?.web?.host? - jsPath = "#{Settings.cdn?.web?.host}#{jsPath}" - imgPath = "#{Settings.cdn?.web?.host}#{imgPath}" - cssPath = "#{Settings.cdn?.web?.host}#{cssPath}" - logger.log "Generating file fingerprints..." for path in [ "#{jsPath}libs/require.js", @@ -46,7 +42,14 @@ for path in [ fingerprints[path] = hash else logger.log filePath:filePath, "file does not exist for fingerprints" - + +logger.log "Finished generating file fingerprints" + +if Settings.cdn?.web?.host? + jsPath = "#{Settings.cdn?.web?.host}#{jsPath}" + imgPath = "#{Settings.cdn?.web?.host}#{imgPath}" + cssPath = "#{Settings.cdn?.web?.host}#{cssPath}" + module.exports = (app, webRouter, apiRouter)-> webRouter.use (req, res, next)->