最新文章

今日新增 407 篇 · 共 7,378 篇 · 来自 241 个博客

Lea Verou··Lea Verou

Import non-ESM libraries in ES Modules, with client-side vanilla JS

AI 摘要The article explains techniques for importing non-ESM libraries—such as those relying on globals or CommonJS—in browser-based ES Modules using vanilla JavaScript. Global-based libraries can be loaded with a bare import statement for their side effects, while CJS libraries can be handled by stubbing window.module and using dynamic import() (since static imports are hoisted), wrapped in a custom require() helper. The author also shares some gripes with ESM design, such as its lack of backward compatibility, forced strict mode, and same-origin restrictions, while remaining overall enthusiastic about native JS modules.

Svelte Blog·

Svelte <3 TypeScript

AI 摘要Svelte now officially supports TypeScript, its most requested feature, enabling developers to use TypeScript in

Without Boats·

Shipping Const Generics in 2020

AI 摘要The author reflects on RFC 2000, opened over three years ago to define const generics for Rust, noting how much has changed since then, such as const fns being stabilized and consts now being evaluated with miri. Despite years of work, the const generics feature has not yet shipped. However, the author believes a useful subset of const generics is now stable enough to ship in the near term.

Tailwind CSS Blog·

Tailwind CSS v1.5.0

Tailwind CSS v1.5.0 is here, now with component variants, responsive container variants, focus-visible support, and more.

Tailwind CSS Blog·

Introducing Tailwind CSS Typography

AI 摘要Tailwind CSS has released @tailwindcss/typography, a new plugin that makes it easy to style vanilla HTML content with beautiful typographic defaults. Previously, styling articles, documents, or blog posts with Tailwind was a tedious task requiring a keen eye for typography and lots of complex custom CSS.

Ethan Marcotte··Ethan Marcotte

Replyin’.

AI 摘要Inspired by Jonnie Hallman and following Simon and Robin's example, the author added 'Reply via email' links to their RSS feed so readers can easily share feedback on posts. They note this is an experiment that might be removed if it proves unmanageable, and while they can't promise a reply to every message, they will read each one. The author also reflects on how much they enjoy watching ideas spread through blogging as people experiment with and build on each other's posts.

Lea Verou··Lea Verou

Releasing MaVoice: A free app to vote on repo issues

AI 摘要The author announces the release of MaVoice, a free Mavo app that displays GitHub repository issues as proposals and sorts them by 👍 reactions, UserVoice-style but without the cost. It was built to gather community input on which CSS statistics to study for the Web Almanac 2020, and can be customized for any repo and label via URL parameters. Caveats include a limit of 100 issues that can be accurately sorted due to GitHub API restrictions and no cap on how many issues a user can vote on.

Preshing on Programming··Jeff Preshing

I/O in Plywood

AI 摘要The article introduces the I/O system of Plywood, an open-source C++ framework, positioning it as a modern alternative to the decades-old standard C and C++ runtime I/O libraries. It explains core concepts such as the buffered OutStream and StringWriter classes, adapter-based chaining for newline conversion and character encoding (e.g., writing a UTF-16 file from UTF-8 input), and buffered text reading with InStream and StringReader, illustrated through code examples. The author also highlights design decisions like OutStream objects not being thread-safe, requiring explicit creation via StdOut::binary() or StdOut::text(), and Plywood's general preference for working with UTF-8 text internally.