-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
80 lines (73 loc) · 2.44 KB
/
index.js
File metadata and controls
80 lines (73 loc) · 2.44 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*jslint node: true, vars: true, indent: 4 */
(function (module) {
"use strict";
var path = require("path"),
Batch = require("batch"),
baseline = require("site-manager-baseline"),
templates = path.join(__dirname, "templates"),
pubdir = path.join(__dirname, "public");
function addDefaults(defaults, isDebugging, cb) {
defaults.title = "Glen Park School";
defaults.hostname = "www.glenparkpto.org";
defaults.stylesheets = ["less/glenpark.less"];
[
"js/bootstrap-carousel.js",
"js/glenpark.js",
"js/gpmenu.js",
"js/home.js",
"js/calendar.js",
"js/contact.js"
].forEach(function (dir) {
defaults.trailingScripts.push(dir);
});
[
path.join(templates, "home.html"),
path.join(templates, "calendar.html"),
path.join(templates, "contact.html"),
path.join(templates, "gpmenu.html")
].forEach(function (dir) {
defaults.templateFiles.push(dir);
});
[
{
"name":"description",
"content":"Glen Park School"
}
].forEach(function (meta) {
defaults.metas.push(meta);
});
[
].forEach(function (file) {
defaults.manifest.push(file);
});
[
"img/mail.jpg",
"img/list.gif",
"img/festival1.jpg",
"img/festival2.jpg",
"img/festival3.jpg"
].forEach(function(file) {
defaults.manifest.push(file);
});
defaults["public"].unshift(pubdir);
defaults.htmlFiles.push(path.join(templates, "facebook.html"));
defaults.googleAnalyticsWebPropertyID = "UA-3602945-1";
return cb(undefined, defaults);
}
module.exports = function (defaults, cb, lopts, gopts, app) {
baseline(defaults, app, lopts, gopts, function(err, defaults, dispatcher) {
if (err) {
return cb(err);
}
var b = new Batch();
b.push(function(cb) {
return addDefaults(defaults, app.logger.isDebugging, function(err) {
return cb(err);
});
});
return b.end(function(err) {
return cb(err, defaults);
});
});
};
})(module);