Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api-server: configure default mixin sources #198

Merged
merged 1 commit into from
May 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions templates/components/api-server/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ template.server = {
'loopback/server/models',
'../common/models',
'./models',
],
mixins: [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pondering whether "mixins" is a good key name, perhaps "mixinSources" would be a better name? (See also "sources" key used for model sources above.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be consistent with what we have for models IMO

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be consistent with what we have for models IMO

👍 for consistency

I am not sure how to apply that rule in this particular case. @ritch What property name would you find more consistent?

This is the current prologue of the scaffolded model-config.json file:

{
  "_meta": {
    "sources": ["loopback/common/models", "etc."],
    "mixins": ["loopback/common/mixins", "etc."]
  }
}

'loopback/common/mixins',
'loopback/server/mixins',
'../common/mixins',
'./mixins',
]
}
},
Expand Down
6 changes: 6 additions & 0 deletions test/facet.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ describe('Facet', function () {
'loopback/server/models',
'../common/models',
'./models'
],
mixins: [
'loopback/common/mixins',
'loopback/server/mixins',
'../common/mixins',
'./mixins'
]
});
});
Expand Down