1.0.7 • Published 1 year ago

wirejs-dom v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

A bare bones component style JavaScript framework.

Install it

yarn add wirejs-dom

Use it

Detailed documentation is pending. Until then, here's the gist of it:

const { DomClass } = require('wirejs-dom');

const template = `<myns:post>
	<h3 data-id='title'></h3>
	<p data-id='body'></p> 
	<p data-id='comments'></p>
</myns:post>`;

DomClass(template, () => {
	const self = this;
	MyAPI.fetchComments(this.id).then(comments => {
		// assuming we've also defined a Comment DomClass ...
		self.comments = comments.map(c => new Comment(c));
	});
});

And of course we try to keep our tests as straightforward as possible. So, you can always refer to the tests to see how DomClass can be used.

1.0.7

1 year ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago