forked from jolira/site-manager-baseline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
26 lines (21 loc) · 824 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*jslint node: true, vars: true, indent: 4 */
(function (module) {
"use strict";
var path = require("path"),
templates = path.join(__dirname, "templates"),
pubdir = path.join(__dirname, "public"),
clientInit = require("./lib/client-init"),
clientLogger = require("./lib/client-logger"),
dispatcher = require("./lib/dispatcher"),
siteAssets = require('site-assets'),
assets = require('./lib/assets');
module.exports = function (defaults, app, lopts, gopts, cb) {
dispatcher(defaults, app, lopts, gopts, function (err, dispatcher) {
dispatcher.on(clientLogger(app.logger));
dispatcher.on(clientInit(app.logger));
siteAssets.merge(defaults, assets);
defaults["public"].unshift(pubdir);
return cb(undefined, defaults, dispatcher);
});
};
})(module);