Skip to content

Instantly share code, notes, and snippets.

View wangrongding's full-sized avatar

荣顶 wangrongding

View GitHub Profile
adamreisnz / package.json
Last active January 19, 2024 13:01
Simple pure npm scripts build process
"name": "project-name",
"description": "Template for static sites",
"version": "1.0.0",
"homepage": "",
"author": {
"name": "Adam Reis",
"url": ""
"license": "UNLICENSED",
<!DOCTYPE html>
<p id="greeting"></p>
<script type="module">
import {Runtime, Inspector, Library} from "";
import notebook from "";
// Rewrite the notebook to redefine the “subject” cell in the main module.
const override = {
sindresorhus /
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.
wangrongding / bookmarks
Last active February 26, 2024 07:07
chrome bookmarks backup
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<DT><H3 ADD_DATE="1620879001" LAST_MODIFIED="1646978437" PERSONAL_TOOLBAR_FOLDER="true">书签栏</H3>