Home / PUBLISH-WITH-2FA

Publish with 2FA

Option 1: Publish with OTP (Recommended)

Get your 2FA code from your authenticator app, then:

cd packages/core
npm publish --otp=123456

Replace 123456 with your actual 6-digit code.

Note: The code expires quickly (30 seconds), so have it ready before running the command!

Option 2: Use npm Token (Automation)

For automated publishing, create a token with 2FA bypass:

  • Go to https://www.npmjs.com/settings/YOUR_USERNAME/tokens
  • Click "Generate New Token" → "Automation"
  • Copy the token
  • Set it locally:
  • npm config set //registry.npmjs.org/:_authToken YOUR_TOKEN
  • Then publish normally:
  • cd packages/core
       npm publish

    What Gets Published

    @larcjs/core@3.0.1 including:
    • pan.mjs (autoloader)
    • pan-bus.mjs, pan-client.mjs, pan-storage.mjs
    • components/ (130 component files - 2.5MB)

    After Publishing

    Wait ~5 minutes for CDN sync, then test:

    # Verify on npm
    npm view @larcjs/core@3.0.1
    
    # Test CDN
    curl -I https://cdn.jsdelivr.net/npm/@larcjs/core@3.0.1/pan.mjs
    curl -I https://cdn.jsdelivr.net/npm/@larcjs/core@3.0.1/components/pan-card.mjs

    Push to GitHub

    git push origin main
    git tag @larcjs/core@3.0.1
    git push --tags