Skip to content

Commit

Permalink
fix(build): repair global usage (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
toddlawton authored Jan 12, 2017
1 parent c5fc108 commit 9424f9b
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You may install Vue Carousel globally:
import Vue from 'vue';
import VueCarousel from '@ssense/vue-carousel';

Vue.use(VueCarousel.default);
Vue.use(VueCarousel);
```
This will make **<carousel>** and **<slide>** available to all components within your Vue app.

Expand Down
2 changes: 1 addition & 1 deletion dist/vue-carousel.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/source/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You may install Vue Carousel globally:
import Vue from 'vue';
import VueCarousel from '@ssense/vue-carousel';

Vue.use(VueCarousel.default);
Vue.use(VueCarousel);
```
This will make **<carousel>** and **<slide>** available to all components within your Vue app.

Expand Down
2 changes: 1 addition & 1 deletion docs/themes/vue/source/js/vue-carousel.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@ssense/vue-carousel",
"version": "0.4.2",
"version": "0.4.3",
"description": "A flexible, responsive, touch-friendly carousel for Vue.js",
"main": "src/index.js",
"main": "dist/vue-carousel.min.js",
"scripts": {
"build": "webpack --config config/webpack.min.conf.js && npm run updateDocAssets",
"coveralls": "cat coverage/client/lcov.info | ./node_modules/.bin/coveralls",
Expand Down
4 changes: 3 additions & 1 deletion src/Carousel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,9 @@
if (this.$slots.default) {
this.$slots.default.forEach((child) => {
const slotChild = child
slotChild.child.width = width
if (slotChild && slotChild.child) {
slotChild.child.width = width
}
})
}
},
Expand Down
21 changes: 11 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/* eslint-disable */
import Carousel from "./Carousel.vue"
import Slide from "./Slide.vue"

var Carousel = require("./Carousel.vue")
var Slide = require("./Slide.vue")

var install = function(Vue) {
const install = (Vue) => {
Vue.component("carousel", Carousel)
Vue.component("slide", Slide)
}

module.exports = {
'default': install,
'Carousel': Carousel,
'Slide': Slide
};
export default {
install,
}

export {
Carousel,
Slide
}

0 comments on commit 9424f9b

Please sign in to comment.