Skip to content

Commit

Permalink
Register caches before plugins
Browse files Browse the repository at this point in the history
Some plugins may have cache dependencies. In order to make cache
configurations available to plugins, this commit switches the order of
registration.

Closes #38
  • Loading branch information
michaelhue committed Apr 15, 2018
1 parent 2a063d6 commit 003b29f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions lib/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,17 @@ internals.manifest = [
list: false,
after: ['services']
},
{
place: 'caches',
method: 'cache.provision',
async: true,
list: true,
useFilename: internals.passthruOn('name'),
example: {
engine: null,
name: ''
}
},
{
place: 'plugins',
method: 'register',
Expand Down Expand Up @@ -159,17 +170,6 @@ internals.manifest = [
after: { $value: async (server) => {}, $comment: 'Optional' }
}
},
{
place: 'caches',
method: 'cache.provision',
async: true,
list: true,
useFilename: internals.passthruOn('name'),
example: {
engine: null,
name: ''
}
},
{
place: 'methods',
method: 'method',
Expand Down
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ describe('HauteCouture', () => {

expect(summary).to.equal([
'path() at path',
'register() at plugins',
'cache.provision() at caches',
'register() at plugins',
'views() at view-manager',
'decorate() at decorations',
'expose() at expose',
Expand Down Expand Up @@ -479,8 +479,8 @@ describe('HauteCouture', () => {

expect(summary).to.equal([
'path() at path',
'register() at plugins',
'cache.provision() at caches',
'register() at plugins',
'views() at view-manager',
'decorate() at decorations',
'expose() at expose',
Expand Down

0 comments on commit 003b29f

Please sign in to comment.