![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
a library for quickly creating web components
zero dependencies - just javascript
Simply just... because. I like to create fun and helpful things - plus there seemed like a slight gap for a web-based, no-build, no-dependencies, no-nothing, prototyping library (at least for me); So here we are.
Probably not... Performance wasn't something I was overly aiming for - it's usable, and works well for smaller prototypes and apps but I wouldn't go off making a full-scale app with it... But then maybe?
yarn add smol-lib
or https://cdn.jsdelivr.net/npm/smol-lib@latest
or copy /lib/index.js into your project.
// via - package import
import { createComponent } from 'smol-lib';
createComponent('my-component', () => {
return ({ render }) => render`
<p class="my-component">
Hello from my component!
</p>
`;
}, `
@keyframes rainbow {
0% {
color: hsl(0, 100%, 50%);
}
33% {
color: hsl(100, 100%, 50%);
}
77% {
color: hsl(300, 100%, 50%);
}
100% {
color: hsl(360, 100%, 50%);
}
}
.my-component {
animation: rainbow 1s infinite;
}
`);
}
// via - CDN (https://cdn.jsdelivr.net/npm/smol-lib@latest)
<script type="module" src="https://cdn.jsdelivr.net/npm/smol-lib@latest" onload="onload()"></script>
<script>
function onload() {
smol.createComponent('my-component', () => {
return ({ render }) => render`
<p class="my-component">
Hello from my component!
</p>
`;
}, `
@keyframes rainbow {
0% {
color: hsl(0, 100%, 50%);
}
33% {
color: hsl(100, 100%, 50%);
}
77% {
color: hsl(300, 100%, 50%);
}
100% {
color: hsl(360, 100%, 50%);
}
}
.my-component {
animation: rainbow 1s infinite;
}
`);
}
</script>
No docs as of yet, which obviously is not helpful.
However I am working on an example site/app that will have the docs on it... it's in development (no ETA) but you can check it out at
smol-library.web.app
(source code in /example)
FAQs
a library for quickly creating web components
The npm package smol-lib receives a total of 0 weekly downloads. As such, smol-lib popularity was classified as not popular.
We found that smol-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.