digitalbazaar / jsonld.js

A JSON-LD Processor and API implementation in JavaScript
https://json-ld.org/
Other
1.66k stars 195 forks source link

Please upgrade to webcomponents #475

Closed busynest closed 2 years ago

busynest commented 2 years ago

I don't understand the reqire() stuff. Webcomponents are the future.

aljones15 commented 2 years ago

https://developer.mozilla.org/en-US/docs/Web/Web_Components

Web Components is a suite of different technologies allowing you to create reusable custom elements — with their functionality encapsulated away from the rest of your code — and utilize them in your web apps.

  1. Web Components appears to be a front end only technology (this library is cross environment and must be usable in node)
  2. Web Components appear to be highly based around associating javascript and css with an html element.

Can you possibly explain further what benefits would come from using web components with this library? Web Components appears to be a standard that developers of front end frameworks such as Hyperapp or Vue can use to standardize the logic of associating code with HTML.

busynest commented 2 years ago

I use nodeJS too. I use https//www.lit.dev Web components standards seem to line up with nodeJS for future. I think benefits for you would be bundling and api. For the internet of hard to document web components, seems like a good fit. If i could already use it with lit and then bundle, then I must learn

davidlehn commented 2 years ago

Are you just asking for the library to be converted to use module syntax? Or are you asking for other changes?

I started the module conversion at some point but have had other priorities. We'll finish that when we have time.

If using Node.js, or a bundler like webpack, you should be able to use this library with import. What "reqire() stuff" are you having problems with?

busynest commented 2 years ago

Yes, Module Syntax.

Edit - removed text meant for another repo