20 lines
664 B
JavaScript
Executable File
20 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]
|
|
}
|
|
}
|