Skip to content

Commit

Permalink
Merge pull request #16 from InDIOS/development
Browse files Browse the repository at this point in the history
 Bump to version 0.3.3
  • Loading branch information
InDIOS authored Nov 1, 2018
2 parents 708eb06 + f1a3f41 commit e42f301
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 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.3
- Added project descriptions to Readme.
- Fixed bug when template elements are condition or loop blocks.

0.3.2
- Added slot function helper.
- Refactored slot elements generation.
Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,25 @@
[![Release][github-img]][github-url]
[![Build Status][travis-image]][travis-url]

A node js module to make standalone web components.

## How to install
Locally
### Overview

[TreborJS](https://npmjs.org/package/trebor) is a [NodeJS](http://nodejs.org) module to compile `component declarated files` into `stand-alone web component` javascript files to be used
in the browser. The format of a [component declaration file](https://github.com/InDIOS/trebor/wiki/Component-declaration) is specified be the module and described
in it's [documentation](https://github.com/InDIOS/trebor/wiki).

### Why?

In this days front-end frameworks are very populars comming to be an important part of a web application. Almost all of then have a runtime library that is part of the application, [Vue](https://github.com/vuejs/vue), [React](https://github.com/facebook/react), [Angular](https://github.com/angular/angular), but what if we can do a component that no need a runtime lib?
what if can create all components without useless code and can run it self?. That is what `TreborJS` do, a module that compile an structured html file in a javascript file with just the code you need and nothing more.

## How to use

Install locally
```bash
npm i trebor -D
```
or globally
or install globally

```bash
npm i trebor -g
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.2",
"version": "0.3.3",
"description": "A node js module to make standalone web components.",
"main": "./build/index.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class NodeElement {
}

hasExpression(): boolean {
return this.isUnknownElement || this.tagName === 'slot' ||
return this.isBlock || 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 e42f301

Please sign in to comment.