From bdee83820e4af82ee52c908ba78ba8e1abfdded7 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Thu, 11 Jun 2015 20:24:03 -0700 Subject: [PATCH] Hot reload pages and config --- app.coffee | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app.coffee b/app.coffee index 0e06299..f6f4d67 100644 --- a/app.coffee +++ b/app.coffee @@ -1,2 +1,9 @@ -exports.context = -> - return require.context './pages', true +exports.loadContext = (callback) -> + context = require.context './pages', true + if module.hot + module.hot.accept(context.id, -> + context = require.context './pages', true + callback context + ) + + callback context