Skip to content

Commit

Permalink
Update slot rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasbeauvais committed Feb 11, 2017
1 parent 9c53238 commit a987b8d
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<a name="1.0.3"></a>
# [1.0.3](https://github.com/nicolasbeauvais/vue-social-sharing/compare/1.0.2...1.0.3) (2017-02-11)
- Update slot rendering

<a name="1.0.2"></a>
# [1.0.2](https://github.com/nicolasbeauvais/vue-social-sharing/compare/1.0.1...1.0.2) (2017-02-11)
- Remove parameters from url when null, refactor parser for more flexibility
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-add-to-calendar",
"version": "1.0.2",
"version": "1.0.3",
"homepage": "https://github.com/nicolasbeauvais/vue-add-to-calendar",
"authors": [
"nicolasbeauvais <nicolasbeauvais1@gmail.com>"
Expand Down
12 changes: 9 additions & 3 deletions dist/vue-add-to-calendar.common.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
/*!
* vue-add-to-calendar v1.0.2
* vue-add-to-calendar v1.0.3
* (c) 2017 nicolasbeauvais
* Released under the MIT License.
*/
'use strict';

var AddToCalendarMixin = {
template: '<a :href="$parent.calendarUrl(calendar)" v-bind:class="`vue-add-to-calendar ${calendar}-calendar`" target="_blank"><slot></slot></a>'
template: "<a :href=\"$parent.calendarUrl(calendar)\" :class=\"calendarClass\" target=\"_blank\"><slot></slot></a>",

computed: {
calendarClass: function calendarClass () {
return ['vue-add-to-calendar', ((this.calendar) + "-calendar")];
}
}
};

var calendars = {
Expand Down Expand Up @@ -148,7 +154,7 @@ var AddToCalendar = {
}
};

AddToCalendar.version = '1.0.2';
AddToCalendar.version = '1.0.3';

AddToCalendar.install = function (Vue) {
Vue.component('add-to-calendar', AddToCalendar);
Expand Down
12 changes: 9 additions & 3 deletions dist/vue-add-to-calendar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* vue-add-to-calendar v1.0.2
* vue-add-to-calendar v1.0.3
* (c) 2017 nicolasbeauvais
* Released under the MIT License.
*/
Expand All @@ -10,7 +10,13 @@
}(this, (function () { 'use strict';

var AddToCalendarMixin = {
template: '<a :href="$parent.calendarUrl(calendar)" v-bind:class="`vue-add-to-calendar ${calendar}-calendar`" target="_blank"><slot></slot></a>'
template: "<a :href=\"$parent.calendarUrl(calendar)\" :class=\"calendarClass\" target=\"_blank\"><slot></slot></a>",

computed: {
calendarClass: function calendarClass () {
return ['vue-add-to-calendar', ((this.calendar) + "-calendar")];
}
}
};

var calendars = {
Expand Down Expand Up @@ -152,7 +158,7 @@ var AddToCalendar = {
}
};

AddToCalendar.version = '1.0.2';
AddToCalendar.version = '1.0.3';

AddToCalendar.install = function (Vue) {
Vue.component('add-to-calendar', AddToCalendar);
Expand Down
4 changes: 2 additions & 2 deletions dist/vue-add-to-calendar.min.js

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-add-to-calendar",
"description": "A Vue.js component that provides 'Add to Calendar' functionality",
"version": "1.0.2",
"version": "1.0.3",
"author": {
"name": "nicolasbeauvais",
"email": "nicolasbeauvais1@gmail.com"
Expand Down Expand Up @@ -92,7 +92,7 @@
"sauce:coolkids": "karma start config/karma.sauce.conf.js -- 0",
"sauce:ie": "karma start config/karma.sauce.conf.js -- 1",
"sauce:mobile": "karma start config/karma.sauce.conf.js -- 2",
"test": "npm run lint && npm run test:cover && npm run test:e2e -- --env firefox",
"test": "npm run lint && npm run test:cover && npm run test:e2e -- --env phantomjs",
"test:cover": "karma start config/karma.cover.conf.js",
"test:coveralls": "karma start config/karma.coveralls.conf.js",
"test:e2e": "npm run build && node test/e2e/runner.js",
Expand Down
8 changes: 7 additions & 1 deletion src/add-to-calendar-mixin.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
export default {
template: '<a :href="$parent.calendarUrl(calendar)" v-bind:class="`vue-add-to-calendar ${calendar}-calendar`" target="_blank"><slot></slot></a>'
template: `<a :href="$parent.calendarUrl(calendar)" :class="calendarClass" target="_blank"><slot></slot></a>`,

computed: {
calendarClass () {
return ['vue-add-to-calendar', `${this.calendar}-calendar`];
}
}
};
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import AddToCalendar from './add-to-calendar';

AddToCalendar.version = '1.0.2';
AddToCalendar.version = '1.0.3';

AddToCalendar.install = (Vue) => {
Vue.component('add-to-calendar', AddToCalendar);
Expand Down

0 comments on commit a987b8d

Please sign in to comment.