Skip to content

Commit

Permalink
resolving conflicts after 0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
caridy committed Jul 9, 2013
2 parents 053e5cb + afc06da commit 8988957
Show file tree
Hide file tree
Showing 18 changed files with 221 additions and 173 deletions.
21 changes: 9 additions & 12 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var express = require('express'),
LocatorHandlebars = require('locator-handlebars'),

config = require('./conf/config'),
PNM_ENV, app, middleware, routes, exposedRoutes, locator;
app, middleware, routes, exposedRoutes, locator;

// -- Configure App ------------------------------------------------------------

Expand All @@ -14,10 +14,11 @@ app = express();
app.set('name', config.name);
app.set('env', config.env);
app.set('port', config.port);
app.set('state namespace', 'app.PNM');
app.set('state namespace', 'PNM');

app.enable('strict routing');

app.expose({}, 'DATA');
app.expose(config.cache.client, 'CACHE');
app.expose(config.flickr, 'FLICKR');

Expand All @@ -27,9 +28,9 @@ app.locals({

// -- Configure YUI ------------------------------------------------------------

PNM_ENV = app.yui.YUI.namespace('Env.PNM'),
PNM_ENV.CACHE = config.cache.server;
PNM_ENV.FLICKR = config.flickr;
global.PNM = {};
PNM.CACHE = config.cache.server;
PNM.FLICKR = config.flickr;

// custom modules should be registered manually or by adding a build.json
// to build them during boot, which is also supported in express-yui
Expand Down Expand Up @@ -92,7 +93,7 @@ function exposeRoute(name) {
exposedRoutes[name] = {
path : route.path,
keys : route.keys,
regex: route.regexp.toString()
regex: route.regexp
};
}

Expand All @@ -101,20 +102,16 @@ exposeRoute('index', '/', myui.expose(), routes.index);
exposeRoute('places', '/places/:id/', [
myui.expose(),
routes.places.load,
middleware.exposeData('place', 'photos'),
middleware.exposeView('grid'),
routes.places.render
]);

exposeRoute('photos', '/photos/:id/', [
myui.expose(),
routes.photos.load,
middleware.exposeData('place', 'photo'),
middleware.exposeView('lightbox'),
routes.photos.render
]);

PNM_ENV.ROUTES = exposedRoutes;
PNM.ROUTES = exposedRoutes;
app.expose(exposedRoutes, 'ROUTES');

// -- Locator and plugins ------------------------------------------------------
Expand All @@ -127,7 +124,7 @@ new Locator({
registerGroup: true,
registerServerModules: true
}))
.parseBundle(__dirname, {}).then(function (have) {
.parseBundle(__dirname, {}).then(function () {

app.yui.use('pnm-helpers');

Expand Down
14 changes: 0 additions & 14 deletions middleware/expose-data.js

This file was deleted.

7 changes: 0 additions & 7 deletions middleware/expose-view.js

This file was deleted.

2 changes: 0 additions & 2 deletions middleware/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
module.exports = {
exposeData : require('./expose-data'),
exposeView : require('./expose-view'),
placeLookup: require('./place-lookup'),
slash : require('express-slash')
};
201 changes: 145 additions & 56 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8988957

Please sign in to comment.