Live data from Hacker News

Stencil – A reusable web component generator

stenciljs.com

11–20 of 107 posts

Re: Stencil – A reusable web component generator

#11
post #5

" Stencil is a new approach to a popular idea: building fast and feature-rich apps in the browser. Taking advantage of new capabilities in the browser, such as Custom Elements V1, Stencil enables developers to write faster and lighter components without the weight of frameworks. The tooling also a solution to teams and library authors building components that support many frameworks. Stencil components work in Angula…

Custom elements v1: http://caniuse.com/#feat=custom-elementsv1

basically Chrome (I just saved you a click)

Re: Stencil – A reusable web component generator

#12

I'm not sure I'm understanding the point behind this. If the main point is to allow people to reuse components (i.e. a calendar widget) across frameworks, then good, but it's going to be quite messy when things start to get complicated and we start hitting integration problems, because some guy on the Internet writing a widget is not going to test & maintain it on all frameworks. It also bothers me the whole Typescri…

It was announced today at Polymer Summit, please take it a look: https://youtu.be/rY233a4tp2s?t=2h6m50s

Re: Stencil – A reusable web component generator

#13

I'm not sure I'm understanding the point behind this. If the main point is to allow people to reuse components (i.e. a calendar widget) across frameworks, then good, but it's going to be quite messy when things start to get complicated and we start hitting integration problems, because some guy on the Internet writing a widget is not going to test & maintain it on all frameworks. It also bothers me the whole Typescri…

Here an engineer at Ionic. You don't need to integrate typescript to use a "widget" generated with Stencil. Stencil is a compiler that generates vanilla web components in javascript. You can just import the generated .js and use the component just like a "button" or native "input".

Great, that makes so much sense. But then, how about other dependencies that might come into play? For example, underscore, is that "packaged" with this generated JS file or some other way around?

Thanks for the prompt response BTW.

Re: Stencil – A reusable web component generator

#14

I'm not sure I'm understanding the point behind this. If the main point is to allow people to reuse components (i.e. a calendar widget) across frameworks, then good, but it's going to be quite messy when things start to get complicated and we start hitting integration problems, because some guy on the Internet writing a widget is not going to test & maintain it on all frameworks. It also bothers me the whole Typescri…

Here an engineer at Ionic. You don't need to integrate typescript to use a "widget" generated with Stencil. Stencil is a compiler that generates vanilla web components in javascript. You can just import the generated .js and use the component just like a "button" or native "input".

In fact we use the type information provided by typescript to generate the web component as performant as possible.

Re: Stencil – A reusable web component generator

#15
post #3

Earlier quoted context omitted.

It's more the OS than the font choice, different OSes render text better or worse. The site looks great on a 15 inch macbook pro.

Designers only looking at their sites on their MacBook Pros is exactly what produces these pretty but unreadable websites.

Adding a "Yes, but..."

Microsoft's refusal, or inability, to release a version of Edge (or even a port of an earlier IE) for macOS exacerbates this situation.

I virtualize Windows on my MacBook for IE/Edge testing of my designs and code, but it requires a workflow and context shifting that I'd perfer I didn't have to do.

Edit: s/I.E./IE

Re: Stencil – A reusable web component generator

#16

Earlier quoted context omitted.

Custom elements v1: http://caniuse.com/#feat=custom-elementsv1

basically Chrome (I just saved you a click)

Although, their demo works perfectly fine in Firefox: https://corehacker-10883.firebaseapp.com/

Re: Stencil – A reusable web component generator

#17

Earlier quoted context omitted.

Here an engineer at Ionic. You don't need to integrate typescript to use a "widget" generated with Stencil. Stencil is a compiler that generates vanilla web components in javascript. You can just import the generated .js and use the component just like a "button" or native "input".

Great, that makes so much sense. But then, how about other dependencies that might come into play? For example, underscore, is that "packaged" with this generated JS file or some other way around? Thanks for the prompt response BTW.

No, Stencil.js is like a "real stencil", it is used to produce something, but it is not in the final product.

There is nothing like "window.stencil" or any stencil related API in the output of the stencil compiler. It generates vanilla JS web components without dependencies.

The documentation of stencil linked in this HN post was in fact created with stencil itself. Just open the Dev Tools!

Re: Stencil – A reusable web component generator

#18

Earlier quoted context omitted.

Custom elements v1: http://caniuse.com/#feat=custom-elementsv1

basically Chrome (I just saved you a click)

If this is true it's not practically useful yet. There must be more to it.

Re: Stencil – A reusable web component generator

#20
post #18

Earlier quoted context omitted.

basically Chrome (I just saved you a click)

If this is true it's not practically useful yet. There must be more to it.

You can use a polyfill to get it working in browsers without custom elements support.
Post reply on HN