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:
parent
2cfc46d561
commit
8edf382b40
5 changed files with 8 additions and 5 deletions
|
@ -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,
|
||||
|
|
4
core/server/models/plugins/index.js
Normal file
4
core/server/models/plugins/index.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
module.exports = {
|
||||
includeCount: require('./include-count'),
|
||||
pagination: require('./pagination')
|
||||
};
|
|
@ -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);
|
Loading…
Reference in a new issue