Skip to content

Instantly share code, notes, and snippets.

@banyudu
banyudu / profiling_eslint_in_ci.blog.md
Created March 19, 2020 06:56
CI中运行ESLint的优化方法

CI中运行ESLint的痛点

虽然在CI中引入ESLint能极大地帮助代码的规范,但是它也会带来额外的成本。

其中最关键的,就是CI执行过程中的时间消耗了。

@sindresorhus
sindresorhus / esm-package.md
Last active July 23, 2024 10:30
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@munrocket
munrocket / wgsl_3d_sdf.md
Last active July 13, 2024 05:11
WGSL 3D SDF Primitives

WGSL 3D SDF Primitives

Revision: 06.08.2023, https://compute.toys/view/407

Sphere - exact

fn sdSphere(p: vec3f, r: f32) -> f32 {
  return length(p) - r;
}