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
Copy file name to clipboardExpand all lines: README.md
+30-20
Original file line number
Diff line number
Diff line change
@@ -1,56 +1,66 @@
1
-
# vue-extensionpoints
1
+
# vue-extensions
2
2
3
-
This library is a Vue plugin providing a custom element which acts as extension point, with a named "hook". Plugins of your application then can provide components for this extension point which are automatically found and rendered replacing the extension.
3
+
This library is a Vue plugin providing a custom element which acts as extension point, with a named "hook". Plugins of your application then can provide "extension" components for this extensionpoint which are automatically found and rendered replacing the extensionpoint.
4
4
5
5
This is intended wherever you need to have a "list" of different looking components at one place each provided by a plugin.
6
6
7
-
If you just need a list of the same component, just with different data, don't use `vue-extensionpoints` just use a `v-for` directive.
7
+
If you just need a list of the same component, just with different data, don't use `vue-extensions` just use a `v-for` directive.
8
8
9
9
## Install
10
10
11
-
The easiest way to install this library in your project is to use the corresponding Vue CLI plugin [extensionpoints](https://github.com/nerdocs/vue-cli-plugin-extensionpoints). It will do all magic for you:
11
+
The easiest way to install this library in your project is to use the corresponding Vue CLI plugin [extensions](https://github.com/nerdocs/vue-cli-plugin-extensions). It will do all magic for you:
12
12
```bash
13
-
# vue add extensionpoints
13
+
# vue add extensions
14
14
```
15
15
16
16
#### Manual install
17
17
18
18
You can do everything manually too, if you want:
19
19
```bash
20
-
npm install vue-extensionpoints
20
+
npm install vue-extensions
21
21
```
22
22
and add the following code:
23
23
24
-
Create a file, e.g. named `plugins.js` (or `plugins/index.js`) which exports all of your plugins (you can e.g. automate the creation of this file in a script):
24
+
Create a file, e.g. named `extensions.js`, which exports all of your extensions as default (you can e.g. automate the creation of this file in a script):
@@ -72,7 +82,7 @@ You have an `<extensionpoint>` tag in your project available now:
72
82
</template>
73
83
```
74
84
75
-
The *vue-extensions* plugin renders the hooked elements replacing the <extensionpoint> element, one after another. It's up to you what the plugin is rendering: One plugin can render a simple `<div>` element with an image, the next plugin (same hook!) can render a complicated component with variables, sub-components etc. The `extensionpoint` renders them one after another. You only have to make sure that your components do what they promise: in the sample case above, `FooListElement` should render a \<li\> element - because it will be rendered within an \<ul\> element. But there are no constraints, you are free to choose.
85
+
The *vue-extensions* plugin renders the hooked elements replacing the <extensionpoint> element, one after another. It's up to you what the extensions are rendering: One extension can render a simple `<div>` element with an image, the next extension (same hook!) can render a complicated component with variables, sub-components etc. The `<extensionpoint>` renders them one after another. You only have to make sure that your components do what they promise: in the sample case above, `FooListElement` should render a \<li\> element - because it will be rendered within an \<ul\> element. But there are no constraints, you are free to choose.
76
86
77
87
78
88
## Development
@@ -81,15 +91,15 @@ You have an idea, improvement, found a bug? Don't hesitate to contact me. PRs an
81
91
82
92
## License
83
93
84
-
`vue-extensionpoints` is licensed under the [MIT](https://opensource.org/licenses/mit-license.php) license
94
+
`vue-extensions` is licensed under the [MIT](https://opensource.org/licenses/mit-license.php) license
85
95
86
96
#### Compiles and minifies library for production
87
97
```
88
98
npm run build-lib
89
99
```
90
100
91
101
#### Runs your tests
92
-
Currently there are no tests, because of three important causes:
102
+
Currently there are no tests (yet), because of three important causes:
0 commit comments