Skip to content

Commit

Permalink
Merge branch 'next' into develop
Browse files Browse the repository at this point in the history
* next:
  Bumping version 1.3.0
  formatting
  add hint about 1.3.0-beta.0 to docs.
  • Loading branch information
LinusBorg committed Jan 18, 2018
2 parents dccd260 + d18cf0a commit 5e23c6f
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 25 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ For more detailed documentation and additional Information, please visit <a href
## Installation

```
// 1.3.0-beta with scopedSlots support:
npm i portal-vue@next
// current stable:
npm i portal-vue
```

Expand Down
14 changes: 4 additions & 10 deletions build/rollup.conf.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@ import nodeResolve from 'rollup-plugin-node-resolve'
const pkg = require('../package.json')

const version = pkg.version
// const version = '1.0.0-beta.4'

const babelConfig = {
// runtimeHelpers: true,
exclude: 'node_modules/**',
plugins: [
'external-helpers',
],
plugins: ['external-helpers'],
}

const nodeResolveOptions = {
module: true, jsnext: true,
module: true,
jsnext: true,
extensions: ['.js', '.vue'],
}

Expand All @@ -37,9 +35,5 @@ export default {
moduleName: 'PortalVue',
dest: './dist/portal-vue.js', // equivalent to --output
sourceMap: true,
plugins: [
babel(babelConfig),
nodeResolve(nodeResolveOptions),
commonjs(),
],
plugins: [babel(babelConfig), nodeResolve(nodeResolveOptions), commonjs()],
}
2 changes: 1 addition & 1 deletion dist/portal-vue.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ docute.init({
title: 'Documentation',
type: 'dropdown',
items: [
{ title: 'Current: v1.3.0-beta.0', path: '#' },
{ title: 'Current: v1.3.0', path: '#' },
{ title: 'Installation Instructions', type: 'label' },
{ title: 'Installation', path: '/docs/installation' },
{ type: 'sep' },
Expand Down
16 changes: 10 additions & 6 deletions docs/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
This is the recommended way to install this Plugin.

Install with npm as a dependency:
``` bash

```bash
npm install --save portal-vue
# or with yarn:
yarn add portal-vue
```

Then include the package in your application and register it with Vue:

``` javascript
```javascript
import PortalVue from 'portal-vue' // as ES6 module
var PortalVue = require('portal-vue') // OR as a commonjs require

Expand All @@ -26,7 +28,7 @@ Vue.use(PortalVue)
PortalVue is available through a couple of CDNs, I recommend
<a href="hhtp://www.unpkg.com">unpkg.com</a>

Just include the script tag *after* the one of Vue.js
Just include the script tag _after_ the one of Vue.js

```html
<scipt src="http://unpkg/vue/dist/vue.js"></scipt>
Expand All @@ -37,7 +39,6 @@ In this case, the plugin will auto-install itself, so there is no need to call V

The components will be named `<portal>` and `<portal-target>`, respectively.


### Local copy

Of course you can include PortalVue into your page as a local file on your server as well.
Expand All @@ -47,26 +48,29 @@ The same rules and restrictions as for CDN apply.
## Options

When installing with `Vue.use()`, you can pass options to change the component names.

```javascript
Vue.use(PortalVue, {
portalName: 'my-portal', // default: 'portal'
portalTargetName: 'my-target', // default:'portal-target'
})
```

These options would make the components available globally as `<my-portal>` and `<my-target>` respectively.

## Using the components locally

If you don't want to register the components globally, don't do `Vue.use('PortalVue')`

Instead, import the component(s) in those components that you need them in and register them locally:

```javascript
import { Portal, PortalTarget } from 'portal-vue'

export default {
components: {
Portal,
PortalTarget
}
PortalTarget,
},
}
```
1 change: 1 addition & 0 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Install Package:

```bash
npm install --save portal-vue

# or with yarn
yarn add portal-vue
```
Expand Down
5 changes: 3 additions & 2 deletions example/components/comp-as-root/comp-as-root.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ export default {
return h('DIV', [
h(
'p',
`This was rendered with a component as the root element in the portal: ${this
.testProp}`
`This was rendered with a component as the root element in the portal: ${
this.testProp
}`
),
])
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "portal-vue",
"version": "1.3.0-beta.0",
"version": "1.3.0",
"description":
"A Vue component to render elements outside of a component's template, elsewhere in the DOM",
"main": "dist/portal-vue.js",
Expand Down

0 comments on commit 5e23c6f

Please sign in to comment.