Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
nuejs-core
Advanced tools
Documentation • Examples • Getting started Rethinking reactivity •
Nue JS is an exceptionally small (2.3kb minzipped) JavaScript library for building web interfaces. It is the core of the upcoming Nue toolset. It’s like Vue.js, React.js, or Svelte but there are no hooks, effects, props, portals, watchers, provides, injects, suspension, or other unusual abstractions on your way. Learn the basics of HTML, CSS, and JavaScript and you are good to go.
With Nue your UI code is cleaner and usually smaller:
It's not unusual to see 2x-10x differences in the amount of code you need to write.
Nue uses an HTML-based template syntax:
<div class="{ type }">
<img src="{ img }">
<aside>
<h3>{ title }</h3>
<p :if="desc">{ desc }</p>
<slot/>
</aside>
</div>
While React and JSX claim to be "Just JavaScript", Nue can be thought of as "Just HTML". Nue is perfect for UX developers focusing on interaction design, accessibility, and user experience.
Three reasons why Nue scales extremely well:
Minimalism, a hundred lines of code is easier to scale than a thousand lines of code
Separation of concerns, easy-to-understand code is easier to scale than "spaghetti code"
Separation of talent, when UX developers focus on the front of the frontend and JS/TS developers focus on the back of the frontend your team skills are optimally aligned:
Nue has a rich component model and it allows you to create all kinds of applications using different kinds of components:
Server components are rendered on the server. They help you build content-focused websites that load faster without JavaScript and are crawled by search engines.
Reactive components are rendered on the client. They help you build dynamic islands or single-page applications.
Hybrid components are partly rendered on the server side, and partly on the client side. These components help you build reactive, SEO-friendly components like video tags or image galleries.
Universal components are used identically on both server- and client side.
Nue allows you to define multiple components on a single file. This is a great way to group related components together and simplify dependency management.
<!-- shared variables and methods -->
<script>
import { someMethod } from './util.js'
</script>
<!-- first component -->
<article @name="todo">
...
</article>
<!-- second component -->
<div @name="todo-item">
...
</div>
<!-- third component -->
<time @name="cute-date">
...
</time>
With library files, your filesystem hierarchy looks cleaner and you need less boilerplate code to tie connected pieces together. They help in packaging libraries for others.
Nue JS comes with a simple render
function for server-side rendering and a compile
function to generate components for the browser. There is no need for toolchains like Webpack or Vite to hijack your natural workflow. Just import Nue to your project and you are good to go.
You can of course use a bundler on the business model if your application becomes more complex with tons of dependencies. Bun and esbuild are great options.
Nue JS is a versatile tool that supports both server- and client-side rendering and helps you build both content-focused websites and reactive single-page applications.
UI library development Create reusable components for reactive frontends or server-generated content.
Progressive enhancement Nue JS is a perfect micro library to enhance your content-focused website with dynamic components or "islands"
Static website generators Just import it into your project and you are ready to render. No bundlers are needed.
Single-page applications Build simpler and more scalable apps together with an upcoming Nue MVC- project.
Templating Nue is a generic tool to generate your websites and HTML emails.
FAQs
HTML microlibrary for UX developers
The npm package nuejs-core receives a total of 18 weekly downloads. As such, nuejs-core popularity was classified as not popular.
We found that nuejs-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.