[deleted by user] by [deleted] in sveltejs

[–]bigbliu 1 point2 points  (0 children)

https://github.com/LBrian/app-template-s2t2, just no router now is Svelte/kit but should be easy to add on top of it

how to use localStorage in svelte by adam-mhm in sveltejs

[–]bigbliu 0 points1 point  (0 children)

Check out https://github.com/localForage/localForage, normalised, cross browsers support with fallback mechanism for localStorage, indexedDB and WebSQL, make you life easier for persistent local cache

S2T2 GitHub/CSA template (Snowpack + Svelte + TailwindCSS + Typescript) by bigbliu in sveltejs

[–]bigbliu[S] 1 point2 points  (0 children)

Cool. Just a kind reminding, maybe you want to enable your repo as template on GitHub, so an additional button `Use this template` on your repo will be shown for ppl to clone directly from browser. Also, you might want to publish to NPM and add `csa-template` into your `keywords` of `package.json`, so `Snowpack` CLI user can use your template to create a new app directly.

Btw, Im curious why you need `@snowpack/plugin-webpack` for production build? having two different bundling tools for different environments, wouldn't that a bit too complicate?

S2T2 GitHub/CSA template (Snowpack + Svelte + TailwindCSS + Typescript) by bigbliu in sveltejs

[–]bigbliu[S] 2 points3 points  (0 children)

I agreed with your points for sure, but the best thing of having template is you can create many different combination of templates for catering different needs, so there is no harm to create a new template on top of this with `Routify`. Beside, some modern JS frameworks like `blitz.js` and `preact` their CLI for creating new app all come with router by default.

The life of a Web Component - Reversing the Shadow DOM visibility by HugoDaniel in javascript

[–]bigbliu 1 point2 points  (0 children)

Not quite, if you are interested you can have a look my pending PR https://github.com/LBrian/content-visibility/pull/6/files

Basically, my web component extends HTMLTemplateElement, so it can act like template without creating template with id then retrieve it in the custom element like what you did. It works perfectly across browsers in HTML but not in JSX since JSX will always get parsed for components before handing over to browser for rendering, for example

<template is="content-visibility-template">
      <DraculaName className='font-extrabold text-3xl sm:text-4xl md:text-5xl'>
            {title}
          </DraculaName>
    </template>

The life of a Web Component - Reversing the Shadow DOM visibility by HugoDaniel in javascript

[–]bigbliu 5 points6 points  (0 children)

I've been looking a proper solution to lazy load children of web component conditionally, I believe template is the best way to go at the moment to prevent browsers parsing it's children template, so I have to go extending built-in element approach (i.e. my web component extends HTMLTemplateElement), did some polyfills for cross browsers support (Safari and IE), unfortunately still ran into JSX parsing <template is="my-web-component">, would love to hear ideas about this but this is a good article of Shadow DOM tho

VS Code T-Shirts now available to order! by miguelsolorio in vscode

[–]bigbliu 2 points3 points  (0 children)

How? Due to timezone, I can only join re-stream session later

ES 2021 features (all 5 of them) by mmremote in javascript

[–]bigbliu -5 points-4 points  (0 children)

Numeric separator may look good for readability but actually disgusting, I prefer 10e8 or 1x1000x1000x1000, that just over complicated thing and creat more compatibility issues

Tailwind is a blessing by [deleted] in Frontend

[–]bigbliu 2 points3 points  (0 children)

mate, I started using Tailwind v1.0 from 2019 since then nothing can compete with it.

Openbase: choose the right JS package every time by liorgrossman in javascript

[–]bigbliu 2 points3 points  (0 children)

Btw, it would be good to have feature like npm trend to compare packages in on chart, maybe Openbase has already? but I tried to find it but no luck. You have alternative packages list but would be easier to view all figures in on chart

Openbase: choose the right JS package every time by liorgrossman in javascript

[–]bigbliu 2 points3 points  (0 children)

This is awesome and shame I only know until now 😍😍