1
0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-22 10:21:36 +03:00
Ghost/core/test/unit/middleware
Hannah Wolfe e060a4f811 🎨 🐛 Improve theme lib, middleware & error handling ()
no issue

🎨 simplify loader - use loadOneTheme for init
- use loadOneTheme for init
- move updateThemeList to the one place that it is used
- this just reduces the surface area of the loader

🎨 Move init up to index temporarily
- need to figure out what stuff goes in here as well as loading themes
- will move it again later once I've got it figured out

🎨 Reorder & cleanup theme middleware
- move the order in blog/app.js so that theme middleware isn't called for shared assets
- add comments & cleanup in the middleware itself, for clarity

🎨 Simplify the logic in themes middleware
- Separate out config dependent on settings changing and config dependent on request
- Move blogApp.set('views') - no reason why this isn't in the theme activation method as
  it's actually simpler if it is there, we already know the active theme exists & can remove the if-guard

🎨 Improve error handling for missing theme
- ensure we display a warning
- don't have complex logic for handling errors
- move loading of an empty hbs object into the error-handler as this will support more cases

🐛 Fix assetHash clearing bug on theme switch
- asset hash wasn't correctly being set on theme switch

🎨 Remove themes.read & test loader instead
- Previously, we've simplified loader & improved error handling
- We are now able to completely remove theme.read as it's nothing more than a wrapper for package.read
- This also means we can change our tests from testing the theme reader to loader
2017-03-13 17:30:35 +01:00
..
api 🔥 remove forceAdminSSL and urlSSL, add admin url () 2017-02-03 18:13:22 +00:00
cache-control_spec.js 🎉 Middleware refactor: Give the API its own express App () 2016-10-11 10:36:00 +02:00
ghost-locals_spec.js Misc Middleware cleanup () 2016-10-10 21:14:32 +02:00
redirect-to-setup_spec.js Ghost OAuth () 2016-09-30 12:45:59 +01:00
serve-favicon_spec.js 🎨 Move settings cache & cleanup settings API () 2017-02-27 16:53:04 +01:00
serve-shared-file_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
static-theme_spec.js allow manifest.json in theme root () 2016-06-29 14:44:01 -06:00
theme-handler_spec.js 🎨 🐛 Improve theme lib, middleware & error handling () 2017-03-13 17:30:35 +01:00
uncapitalise_spec.js Misc Middleware cleanup () 2016-10-10 21:14:32 +02:00
url-redirects_spec.js 🎹 re-work url redirects () 2017-02-10 11:42:18 +00:00