Skip to content

Commit 8623c29

Browse files
committed
rename project to vue-cli-plugin-extensions
& relink to vue-extensions
1 parent 138ddf6 commit 8623c29

File tree

9 files changed

+42
-43
lines changed

9 files changed

+42
-43
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# vue-cli-plugin-extensionpoints
1+
# vue-cli-plugin-extensions
22

3-
This is a plugin for [Vue CLI](https://cli.vuejs.org) to add [Vue extensionpoints](https://github.com/nerdocs/vue-extensionpoints) to your app easily.
3+
This is a plugin for [Vue CLI](https://cli.vuejs.org) to add [Vue extensions](https://github.com/nerdocs/vue-extensions) to your app easily.
44

55
Just install it with
66

77
```bash
8-
vue add extensionpoints
8+
vue add extensions
99
```
1010

1111
The plugin adds the dependency to your application and modifies a few files (namely *main.js*, and creates a *plugins* directory).
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
// plugins.js
1+
// extensions.js
22

33
// this file should be generated automatically by your plugin system
44
// It should export a default object which contains plugins.
55
// A plugin is a named index of "hooks" pointing to a list of Vue components
66
// implementing that hook.
77

8-
import MyPlugin from '@/plugins/myplugin'
8+
import MyExtension from '@/extensions/myextension'
99
//
1010
// or, directly here:
1111
//
12-
// var FooPlugin = {
12+
// var FooExtension = {
1313
// hooks: {
14-
// "plugins": [FooComponent]
14+
// "app-plugins": [FooComponent]
1515
// }
1616
// }
1717

1818
export default {
19-
MyPlugin,
20-
// FooPlugin
19+
MyExtension,
20+
// FooExtension
2121
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
22
<div>
3-
Greetings from the Foo plugin!
3+
Greetings from the Foo extension!
44
</div>
55
</template>

generator/example/src/plugins/myplugin/index.js renamed to generator/example/src/extensions/myextension/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import FooComponent from './components/FooComponent.vue'
22

33
export default {
44
hooks: {
5-
"plugins": [FooComponent]
5+
"app-plugins": [FooComponent]
66
}
77
}

generator/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const fs = require('fs')
33
module.exports = (api, options) => {
44
api.extendPackage({
55
dependencies: {
6-
'vue-extensionpoints': '^0.1.5',
6+
'vue-extensions': '^0.2',
77
},
88
})
99
api.render('./template',{
@@ -17,9 +17,9 @@ module.exports = (api, options) => {
1717

1818
// add import
1919
api.injectImports(api.entryFile,
20-
`import Extensionpoints from 'vue-extensionpoints'`)
20+
`import Extensionpoints from 'vue-extensions'`)
2121
api.injectImports(api.entryFile,
22-
`import plugins from '@/plugins'`)
22+
`import AppExtensions from '@/extensions'`)
2323
}
2424

2525
module.exports.hooks = (api) => {
@@ -32,7 +32,7 @@ module.exports.hooks = (api) => {
3232
// if not already found, add Vue.use to file
3333
if(lines.findIndex(line => line.match(/Vue.use\(Extensionpoints/)) < 0) {
3434
const renderIndex = lines.findIndex(line => line.match(/new Vue/))
35-
lines[renderIndex] = `Vue.use(Extensionpoints, {plugins})${EOL}${EOL}` + lines[renderIndex]
35+
lines[renderIndex] = `Vue.use(Extensionpoints, {extensions: AppExtensions})${EOL}${EOL}` + lines[renderIndex]
3636
fs.writeFileSync(api.entryFile, lines.join(EOL), { encoding: 'utf-8' })
3737
}
3838

generator/template/src/components/HelloWorldWithPlugins.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<template>
22
<div class="hello">
33
<h1>{{ msg }}</h1>
4-
<h3>Installed Plugins</h3>
4+
<h3>Installed Extensions</h3>
55
<ul>
6-
<extensionpoint hook="plugins"/>
6+
<extensionpoint hook="app-plugins"/>
77
</ul>
88
<h3>Essential Links</h3>
99
<ul>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// extensions/index.js
2+
3+
// this file should be generated automatically by your plugin system.
4+
// It should export a default object which contains "extension" vue components.
5+
// An extension is a named index of "hooks" pointing to a list of Vue components
6+
// implementing that hook.
7+
8+
// import MyExtension from '@/extensions/myextension'
9+
//
10+
//// or, directly here:
11+
// var FooExtension = {
12+
// hooks: {
13+
// "app-plugins": [FooComponent]
14+
// }
15+
// }
16+
17+
export default {
18+
// MyExtension,
19+
// FooExtension
20+
}

generator/template/src/plugins/index.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "vue-cli-plugin-extensionpoints",
2+
"name": "vue-cli-plugin-extensions",
33
"version": "0.1.7",
4-
"description": "Vue CLI plugin for adding extensionpoints",
4+
"description": "Vue CLI plugin for automatially adding vue-extensions to a project",
55
"main": "index.js",
66
"author": {
77
"name": "Christian González",
@@ -12,7 +12,7 @@
1212
},
1313
"repository": {
1414
"type": "git",
15-
"url": "git+https://github.com/nerdocs/vue-cli-plugin-extensionpoints.git"
15+
"url": "git+https://github.com/nerdocs/vue-cli-plugin-extensions.git"
1616
},
1717
"keywords": [
1818
"vue",
@@ -21,7 +21,7 @@
2121
],
2222
"license": "MIT",
2323
"bugs": {
24-
"url": "https://github.com/nerdocs/vue-cli-plugin-extensionpoints/issues"
24+
"url": "https://github.com/nerdocs/vue-cli-plugin-extensions/issues"
2525
},
26-
"homepage": "https://github.com/nerdocs/vue-cli-plugin-extensionpoints#readme"
26+
"homepage": "https://github.com/nerdocs/vue-cli-plugin-extensions#readme"
2727
}

0 commit comments

Comments
 (0)