2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Move bookshelf plugins into own folder

This commit is contained in:
Hannah Wolfe 2015-11-11 18:24:24 +00:00
parent 2cfc46d561
commit 8edf382b40
5 changed files with 8 additions and 5 deletions

View file

@ -18,8 +18,7 @@ var _ = require('lodash'),
uuid = require('node-uuid'),
validation = require('../../data/validation'),
baseUtils = require('./utils'),
includeCount = require('./include-count'),
pagination = require('./pagination'),
plugins = require('../plugins'),
gql = require('ghost-gql'),
ghostBookshelf;
@ -32,10 +31,10 @@ ghostBookshelf = bookshelf(config.database.knex);
ghostBookshelf.plugin('registry');
// Load the Ghost include count plugin, which allows for the inclusion of cross-table counts
ghostBookshelf.plugin(includeCount);
ghostBookshelf.plugin(plugins.includeCount);
// Load the Ghost pagination plugin, which gives us the `fetchPage` method on Models
ghostBookshelf.plugin(pagination);
ghostBookshelf.plugin(plugins.pagination);
// ## ghostBookshelf.Model
// The Base Model which other Ghost objects will inherit from,

View file

@ -0,0 +1,4 @@
module.exports = {
includeCount: require('./include-count'),
pagination: require('./pagination')
};

View file

@ -6,7 +6,7 @@ var should = require('should'),
rewire = require('rewire'),
// Thing we're testing
pagination = rewire('../../server/models/base/pagination');
pagination = rewire('../../../server/models/plugins/pagination');
// To stop jshint complaining
should.equal(true, true);