From fd4d53e42cd7d40c8276b4acbc5153a114361ea4 Mon Sep 17 00:00:00 2001
From: Peter Jaszkowiak
Date: Mon, 28 Nov 2016 13:05:22 -0700
Subject: [PATCH] Remove unnecesary admin search indexing
---
src/meta/templates.js | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/src/meta/templates.js b/src/meta/templates.js
index 4e7f934624..fd5c1f71e1 100644
--- a/src/meta/templates.js
+++ b/src/meta/templates.js
@@ -12,7 +12,6 @@ var plugins = require('../plugins');
var utils = require('../../public/src/utils');
var Templates = {};
-var searchIndex = {};
Templates.compile = function (callback) {
callback = callback || function () {};
@@ -131,10 +130,6 @@ function compile(callback) {
}
}
- if (relativePath.match(/^\/admin\/[\s\S]*?/)) {
- addIndex(relativePath, file);
- }
-
mkdirp.sync(path.join(viewsPath, relativePath.split('/').slice(0, -1).join('/')));
fs.writeFile(path.join(viewsPath, relativePath), file, next);
}, function (err) {
@@ -143,25 +138,11 @@ function compile(callback) {
return callback(err);
}
- compileIndex(viewsPath, function (err) {
- if (err) {
- return callback(err);
- }
- winston.verbose('[meta/templates] Successfully compiled templates.');
+ winston.verbose('[meta/templates] Successfully compiled templates.');
- callback();
- });
+ callback();
});
});
}
-
-function addIndex(path, file) {
- searchIndex[path] = file;
-}
-
-function compileIndex(viewsPath, callback) {
- fs.writeFile(path.join(viewsPath, '/indexed.json'), JSON.stringify(searchIndex), callback);
-}
-
module.exports = Templates;
\ No newline at end of file