You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**root**|`'./'`| String value as root path for components lookup. |
94
+
|**folders**|`['']`| Array of additional multi folders path from `options.root` or any defined namespaces root, fallback or custom. |
95
+
|**tagPrefix**|`x-`| String for tag prefix. The plugin will use RegExp with this string. |
96
+
|**tag**|`false`| String or boolean value for component tag. Use this with `options.attribute`. Boolean only false. |
97
+
|**attribute**|`src`| String value for component attribute for set path. |
98
+
|**namespaces**|`[]`| Array of namespace's root path, fallback path and custom path for override. |
99
+
|**namespaceSeparator**|`::`| String value for namespace separator to be used with tag name. Example `<x-namespace::button>`|
100
+
|**fileExtension**|`html`| String value for file extension of the components used for retrieve x-tag file. |
101
+
|**yield**|`yield`| String value for `<yield>` tag name. Where main content of component is injected. |
102
+
|**slot**|`slot`| String value for `<slot>` tag name. Used with RegExp by appending `:` (example `<slot:slot-name>`). |
103
+
|**fill**|`fill`| String value for `<fill>` tag name. Used with RegExp by appending `:` (example `<fill:slot-name>`). |
104
+
|**slotSeparator**|`:`| String value used for separate `<slot>` and `<fill>` tag from their names. |
105
+
|**push**|`push`| String value for `<push>` tag name. |
106
+
|**stack**|`stack`| String value for `<stack>` tag name. |
107
+
|**localsAttr**|`props`| String value used in `<script props>` parsed by the plugin to retrieve locals in the components. |
108
+
|**expressions**|`{}`| Object to configure `posthtml-expressions`. You can pre-set locals or customize the delimiters for example. |
109
+
|**plugins**|`[]`| PostHTML plugins to apply for every parsed components. |
110
+
|**matcher**|`[{tag: options.tagPrefix}]`| Array of object used to match the tags. |
111
+
|**attrsParserRules**|`{}`| Additional rules for attributes parser plugin. |
112
+
|**strict**|`true`| Boolean value for enable or disable throw an exception. |
113
+
|**mergeCustomizer**|`function`| Function callback passed to lodash `mergeWith` for attribute `locals` and `merge:attribute`. By default it's used to concat array. |
113
114
114
115
## Features
115
116
@@ -597,6 +598,9 @@ So the prop `size` is not override since we prepend `computed:` to the attribute
597
598
And the prop `items` is merged and not override.
598
599
You can also notice how the `class` attribute is merged with `class` attribute of the first node. Let's see in next section more about this.
599
600
601
+
You can change how attributes are merged by passing via options a callback function used by lodash method [mergeWith](https://lodash.com/docs/4.17.15#mergeWith).
602
+
By default, it's used to concat array.
603
+
600
604
### Attributes
601
605
602
606
Your can pass any attributes to your components and this will be added to the first node of your component, or to the node with an attribute named `attributes`.
0 commit comments