Skip to content

Commit

Permalink
Merge pull request #9 from InDIOS/development
Browse files Browse the repository at this point in the history
Bump to version 0.2.1
  • Loading branch information
InDIOS authored Oct 2, 2018
2 parents 1adbf74 + 8086975 commit b85001a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.2.1
- Fixed issue analyzing slots.
- Fixed bug mounting components.

0.2.0
- Added commonjs to the list of output formats.
- Added new badges to the README.
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.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "trebor",
"version": "0.2.0",
"version": "0.2.1",
"description": "A node js module to make standalone web components.",
"main": "./build/index.js",
"bin": {
Expand Down Expand Up @@ -59,7 +59,13 @@
"webpack": "^4.16.5",
"webpack-cli": "^3.1.0"
},
"keywords": [],
"keywords": [
"single-file-component",
"standalone-components",
"no-framework",
"cli",
"web-components"
],
"author": "InDIOS",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/generators/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export function genComponent(node: NodeElement, areas: BlockAreas, scope: string
}`);
}
});
areas.unmount.push(`${variable}.$mount(_$frag, ${anchor});`);
areas.unmount.push(`${variable}.$mount(${root || '_$frag'}, ${anchor});`);
if (varName === 'component') {
let updateVar = `update${capitalize(variable)}`;
areas.update.push(`let ${updateVar} = ${setComponent}(${isIsAttrExp ? [scope, ...params].join(', ') : ''});
Expand Down
3 changes: 2 additions & 1 deletion src/utilities/classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ export class NodeElement {
}

hasExpression(): boolean {
return this.isUnknownElement || this.attributes.some(a => /^[$@:#]/.test(a.name)) ||
return this.isUnknownElement || this.tagName === 'slot' ||
this.attributes.some(a => /^[$@:#]/.test(a.name)) ||
/\{\{\s*((?!\}\})(.|\n))*\}\}/.test(this.textContent) ||
this.childNodes.some(c => c.hasExpression());
}
Expand Down

0 comments on commit b85001a

Please sign in to comment.