19 lines
664 B
JavaScript
Executable file
19 lines
664 B
JavaScript
Executable file
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
module.exports = function installDirectives (component, directives) {
|
|
var options = typeof component.exports === 'function'
|
|
? component.exports.extendOptions
|
|
: component.options
|
|
|
|
if (typeof component.exports === 'function') {
|
|
options.directives = component.exports.options.directives
|
|
}
|
|
|
|
options.directives = options.directives || {}
|
|
|
|
for (var i in directives) {
|
|
options.directives[i] = options.directives[i] || directives[i]
|
|
}
|
|
}
|