use templates.js module instead

v1.18.x
psychobunny 11 years ago
parent e235cd5288
commit 0e92c7ed94

@ -121,7 +121,7 @@ function start() {
require('./src/database').init(function(err) { require('./src/database').init(function(err) {
meta.configs.init(function () { meta.configs.init(function () {
var templates = require('./public/src/templates'), var templates = require('templates.js'),
webserver = require('./src/webserver'), webserver = require('./src/webserver'),
sockets = require('./src/socket.io'), sockets = require('./src/socket.io'),
plugins = require('./src/plugins'), plugins = require('./src/plugins'),

@ -26,7 +26,7 @@
} }
module.exports = function() { module.exports = function() {
var templates = templates || require('./templates'); var templates = templates || require('templates.js');
templates.registerHelper('displayUsersLink', helpers.displayUsersLink); templates.registerHelper('displayUsersLink', helpers.displayUsersLink);
templates.registerHelper('buildMetaTag', helpers.buildMetaTag); templates.registerHelper('buildMetaTag', helpers.buildMetaTag);

@ -4,11 +4,11 @@ var fs = require('fs'),
async = require('async'), async = require('async'),
path = require('path'), path = require('path'),
winston = require('winston'), winston = require('winston'),
templates = require('templates.js'),
User = require('./user'), User = require('./user'),
Plugins = require('./plugins'), Plugins = require('./plugins'),
Meta = require('./meta'), Meta = require('./meta'),
templates = require('../public/src/templates'),
app = {}, app = {},
Emailer = {}; Emailer = {};

@ -245,15 +245,15 @@ var fs = require('fs'),
'vendor/xregexp/xregexp.js', 'vendor/xregexp/xregexp.js',
'vendor/xregexp/unicode/unicode-base.js', 'vendor/xregexp/unicode/unicode-base.js',
'vendor/buzz/buzz.min.js', 'vendor/buzz/buzz.min.js',
'../node_modules/templates.js/lib/templates.js',
'src/utils.js', 'src/utils.js',
'src/app.js', 'src/app.js',
'src/templates.js',
'src/ajaxify.js', 'src/ajaxify.js',
'src/variables.js', 'src/variables.js',
'src/widgets.js', 'src/widgets.js',
'src/translator.js', 'src/translator.js',
'src/helpers.js', 'src/helpers.js',
'src/overrides.js', 'src/overrides.js'
], ],
minFile: 'nodebb.min.js', minFile: 'nodebb.min.js',
loadRJS: function(callback) { loadRJS: function(callback) {

@ -1,7 +1,6 @@
"use strict"; "use strict";
var templates = require('./../../public/src/templates'), var utils = require('./../../public/src/utils'),
utils = require('./../../public/src/utils'),
meta = require('./../meta'), meta = require('./../meta'),
plugins = require('./../plugins'), plugins = require('./../plugins'),
db = require('./../database'), db = require('./../database'),
@ -15,6 +14,7 @@ var templates = require('./../../public/src/templates'),
express = require('express'), express = require('express'),
winston = require('winston'), winston = require('winston'),
flash = require('connect-flash'), flash = require('connect-flash'),
templates = require('templates.js'),
relativePath, relativePath,
viewsPath, viewsPath,

@ -2,9 +2,10 @@
var async = require('async'), var async = require('async'),
winston = require('winston'), winston = require('winston'),
templates = require('templates.js'),
plugins = require('./plugins'), plugins = require('./plugins'),
db = require('./database'), db = require('./database');
templates = require('./../public/src/templates');
(function(Widgets) { (function(Widgets) {

Loading…
Cancel
Save