Skip to content

Instantly share code, notes, and snippets.

@jonchurch
Last active November 20, 2025 21:42
Show Gist options
  • Select an option

  • Save jonchurch/d0f641e9395a34afe35c9ab4043f378a to your computer and use it in GitHub Desktop.

Select an option

Save jonchurch/d0f641e9395a34afe35c9ab4043f378a to your computer and use it in GitHub Desktop.
building lodash docs html to copy over to the lodash.com repo

Building Lodash Documentation HTML

Steps

# 1. Switch to Node 11
nvm use 11

# 2. Install dependencies (if not done yet)
npm install

# 3. Build docs
npm run doc:sitehtml

# Output: doc/4.17.21.html

Why Node 11?

[email protected] (used by marky-markdown) is incompatible with modern Node.js due to old nan@^2.0.9 and V8 API changes. Node 11 is the newest version that works.

If you have ignore-scripts=true in ~/.npmrc

Check if you have it enabled:

npm config get ignore-scripts

If it returns true, use these commands instead:

# 1. Switch to Node 11
nvm use 11

# 2. Manually build oniguruma (one-time)
cd node_modules/oniguruma && npx node-gyp@8 rebuild && cd ../..

# 3. Build docs directly
node lib/main/build-doc site && node lib/main/build-site

# Output: doc/4.17.21.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment