Skip to content

Commit

Permalink
Merge pull request #14 from InDIOS/development
Browse files Browse the repository at this point in the history
Bump to version 0.3.1
  • Loading branch information
InDIOS authored Oct 29, 2018
2 parents a216b24 + 854620a commit c75adc4
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.3.1
- Fixed missing hook prefixes.
- Fixed issue with transition to trebor-tools module.

0.3.0
- Added warning when trebor-tools module are not installed.
- Added trebor-tools as dependency when format is 'es' or 'cjs'.
Expand Down
4 changes: 2 additions & 2 deletions examples/animation/dist/js/animation.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/animation/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
},
resolve: {
alias: {
'trebor/tools': resolve(__dirname, '../../tools'),
'trebor-tools': resolve(__dirname, '../../../trebor-tools'),
'trebor-transitions': resolve(__dirname, '../../../trebor-transitions')
}
},
Expand Down
2 changes: 1 addition & 1 deletion examples/calendar/dist/js/calendar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/calendar/src/components/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default {
})
}
},
afterMount() {
didMount() {
this.$set('date', new Date(this.value.valueOf()));
this.createCalendar(this.date.getMonth(), this.date.getFullYear());
},
Expand Down
2 changes: 1 addition & 1 deletion examples/calendar/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
},
resolve: {
alias: {
'trebor/tools': resolve(__dirname, '../../tools')
'trebor-tools': resolve(__dirname, '../../../trebor-tools')
}
},
resolveLoader: {
Expand Down
2 changes: 1 addition & 1 deletion examples/clock/dist/js/clock.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/clock/src/components/clock.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export default {
afterMount() {
didMount() {
this.interval = setInterval(() => {
this.$set('time', new Date());
}, 1000);
},
beforeDestroy() {
willDestroy() {
clearInterval(this.interval);
},
model: {
Expand Down
2 changes: 1 addition & 1 deletion examples/clock/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
},
resolve: {
alias: {
'trebor/tools': resolve(__dirname, '../../tools')
'trebor-tools': resolve(__dirname, '../../../trebor-tools')
}
},
resolveLoader: {
Expand Down
2 changes: 1 addition & 1 deletion examples/counter/dist/js/counter.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/counter/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
},
resolve: {
alias: {
'trebor/tools': resolve(__dirname, '../../tools')
'trebor-tools': resolve(__dirname, '../../../trebor-tools')
}
},
resolveLoader: {
Expand Down
2 changes: 1 addition & 1 deletion examples/dynamic-component/dist/js/dynamic.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/dynamic-component/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
},
resolve: {
alias: {
'trebor/tools': resolve(__dirname, '../../tools')
'trebor-tools': resolve(__dirname, '../../../trebor-tools')
}
},
resolveLoader: {
Expand Down
2 changes: 1 addition & 1 deletion examples/todomvc/dist/js/todo.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/todomvc/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
},
resolve: {
alias: {
'trebor/tools': resolve(__dirname, '../../tools')
'trebor-tools': resolve(__dirname, '../../../trebor-tools')
}
},
resolveLoader: {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "trebor",
"version": "0.3.0",
"version": "0.3.1",
"description": "A node js module to make standalone web components.",
"main": "./build/index.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion src/generators/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function genComponent(node: NodeElement, areas: BlockAreas, scope: string
} else {
init += `${globCompName} = ${varName === 'selfRef' ? `${scope}.constructor` : `children['${tag}'] || window['${globCompName}']`};`;
!areas.extras.includes(init) && areas.extras.push(init);
areas.extras.push(`${anchor} = _$ct();
areas.extras.push(`${anchor} = _$text();
${variable} = _$addChild(${scope}, ${globCompName}, ${attrs});`);
}
areas.create.push(`${variable}.$create();`);
Expand Down
4 changes: 2 additions & 2 deletions tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ function _$BaseComponent(attrs: AttrParams, template: TemplateFn, options: Compo
_$define(self, key, {
value: (function (key) {
const hook = key[1].toUpperCase() + key.slice(2);
const bhook = opts[`before${hook}`];
const ahook = opts[`after${hook}`];
const bhook = opts[`will${hook}`];
const ahook = opts[`did${hook}`];
return function () {
bhook && bhook.call(this);
key.slice(1) === 'update' ? value.call(this, this) : value.apply(this, arguments);
Expand Down

0 comments on commit c75adc4

Please sign in to comment.