Skip to Content
  • Website
  • Login
Codsen
  • Home
  • Open Source
  • Articles
  • About

Articles→Tag→JS

jsΣ=8

See all tags
Article  ·  Sunday, 28 February 2021
`chalk` vs. `colorette`

chalk vs. colorette

Tooling choices are a subjective matter. Lately, I've been observing colorette taking over erroding chalk, and I have few thoughts on this subject.

Read article
all posted tagged js
Article  ·  Wednesday, 03 March 2021
`codsen-parser` vs. `hyntax`

codsen-parser vs. hyntax

Imagine the HTML: <a></b>.

Parser-wise, how would you design the AST architecture, considering cases like that?

Read article
all posted tagged js
Article  ·  Friday, 02 April 2021
`html-crush` bug fixed

html-crush bug fixed

One line in Babel config, env preset's loose set to true was causing a spread operator to disappear on only CommonJS builds (not ES Modules or UMD), which led to broken logic (program could not calculate opts.breakToTheLeftOf correctly any more), program inserted extra blank lines. A crazy bug, isn't it?

Read article
all posted tagged js
Article  ·  Thursday, 19 May 2022
rollup vs esbuild: `iife` is not `umd`

rollup vs esbuild: iife is not umd

Back in the day, before native ES Modules, UMD builds were superior to IIFE because we could unit test them.

And while Rollup and Webpack can produce UMD, esbuild can only make IIFE, so that was an argument against using the esbuild.

Read article
all posted tagged jsall posted tagged ts
Article  ·  Monday, 20 June 2022
Importing SVG in Remix MDX

Importing SVG in Remix MDX

A decade ago, Chris Coyier from CSS-Tricks described ways to consume SVG, which can be distilled into two groups: to link and to embed.

Fast forward to 2022, the market has shifted from WordPress+PHP to React+TypeScript, but the same dilemma "to link or to embed?" still applies because, at the bottom of it, we're still dealing with the same HTML and CSS as we did a decade ago.

So what's the best way to import SVG in MDX?

Read article
all posted tagged jsall posted tagged tsall posted tagged remixall posted tagged mdx
Article  ·  Wednesday, 16 September 2020
Why `object-path` package is great

Why object-path package is great

object-path is a getter/setter for nested arrays and plain objects. Here we use it directly and also align our API's to it. Here's why.

Read article
all posted tagged apiall posted tagged js
Article  ·  Thursday, 11 March 2021
An observation regarding TypeScript And type safety

An observation regarding TypeScript And type safety

Consider a function written in TS, which multiplies two numbers...

Read article
all posted tagged jsall posted tagged ts
Article  ·  Sunday, 12 June 2022
Syntax highlighting in Remix

Syntax highlighting in Remix

Syntax highlighting is done using either highlight.js or prism.js. Once you've picked one, you'll have to set it up for code blocks: 1. within MDX and 2. outside MDX. That's how it works on all kinds of frameworks, not just Remix, although I'll post examples for Remix.

This setup is mostly a trivial task; however, there are a few niggles worth mentioning.

Read article
all posted tagged jsall posted tagged tsall posted tagged reactall posted tagged remixall posted tagged meta

Codsen the company

UK Companies House 🏢 assigned Codsen Ltd a number #9204532 back on Friday, September 5th, 2014. That makes Codsen 7 years, 9 months and 26 days old.

Cookies

Sadly, there's no Cookie Notice to show because we use Fathom (referral linkopens in a new tab) which is GDPR compliant and all its data is housed exclusively in EU. Our analytics are public, see them hereopens in a new tab.

Activities

🐛 See a bug? Raise an issueopens in a new tab
💘 Check out the Indiewebopens in a new tab and Libera manifestoopens in a new tab

Trivia

Built with 💿 Remixopens in a new tab framework. See more in Trivia section.

Copyright

All rights reserved © Codsen Ltd 2022
All our open source packages are under MIT licenceopens in a new tab