Skip to content

Instantly share code, notes, and snippets.

@bevacqua bevacqua/wiring.js
Created Jul 3, 2015

Embed
What would you like to do?
The wiring module in ponyfoo/ponyfoo when autogenerated by `taunus -o`
'use strict';
var templates = {
'account/bio': require('../views/shared/account/bio.js'),
'account/login': require('../views/shared/account/login.js'),
'articles/archives': require('../views/shared/articles/archives.js'),
'articles/article': require('../views/shared/articles/article.js'),
'articles/articles': require('../views/shared/articles/articles.js'),
'articles/comment-thread': require('../views/shared/articles/comment-thread.js'),
'articles/comment': require('../views/shared/articles/comment.js'),
'articles/comments': require('../views/shared/articles/comments.js'),
'articles/search-results': require('../views/shared/articles/search-results.js'),
'author/compose': require('../views/shared/author/compose.js'),
'author/email': require('../views/shared/author/email.js'),
'author/review': require('../views/shared/author/review.js'),
'error/not-found': require('../views/shared/error/not-found.js'),
'partials/tags': require('../views/shared/partials/tags.js')
};
var controllers = {
'account/bio': require('../../client/js/controllers/account/bio.js'),
'articles/article': require('../../client/js/controllers/articles/article.js'),
'articles/comments': require('../../client/js/controllers/articles/comments.js'),
'author/compose': require('../../client/js/controllers/author/compose.js'),
'author/email': require('../../client/js/controllers/author/email.js'),
'author/review': require('../../client/js/controllers/author/review.js')
};
var routes = [
{
route: '/',
action: 'articles/home'
},
{
route: '/articles/feed',
ignore: true
},
{
route: '/articles/archives',
action: 'articles/archives'
},
{
route: '/articles/first',
action: 'articles/first'
},
{
route: '/articles/last',
action: 'articles/last'
},
{
route: '/articles/random',
action: 'articles/random'
},
{
route: '/articles/tagged/:tags',
action: 'articles/tagged'
},
{
route: '/articles/search/:terms',
action: 'articles/search'
},
{
route: '/articles/search/:terms/tagged/:tags',
action: 'articles/searchTagged'
},
{
route: '/articles/:year(\d{4})/:month([01]\d)/:day([0-3]\d)',
action: 'articles/dated'
},
{
route: '/articles/:year(\d{4})/:month([01]\d)',
action: 'articles/dated'
},
{
route: '/articles/:year(\d{4})',
action: 'articles/dated'
},
{
route: '/articles/:slug',
action: 'articles/article'
},
{
route: '/account/login',
action: 'account/login'
},
{
route: '/account/login/:provider',
ignore: true
},
{
route: '/account/logout',
ignore: true
},
{
route: '/account/bio',
action: 'account/bio'
},
{
route: '/author/compose',
action: 'author/compose'
},
{
route: '/author/compose/:slug',
action: 'author/compose'
},
{
route: '/author/email',
action: 'author/email'
},
{
route: '/author/review',
action: 'author/review'
},
{
route: '/*',
action: 'error/not-found'
}
];
module.exports = {
templates: templates,
controllers: controllers,
routes: routes
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.