🚀 New Feature: Enhanced JSDoc Support in Syntax Scribe

🚀 New Feature: Enhanced JSDoc Support in Syntax Scribe

The best of both worlds: automatic documentation meets developer-written comments

Big News: Introducing the -useJsDocs Flag

We're excited to announce a powerful new feature in Syntax Scribe that gives you the best of both worlds: our industry-leading automatic code analysis combined with the ability to leverage your existing JSDoc comments.

What's New?

The new --useJsDocs flag transforms how Syntax Scribe handles documentation generation. When enabled, Syntax Scribe will:

âś… Prioritize your JSDoc comments when they exist

âś… Fall back to automatic analysis for undocumented code

âś… Maintain consistent formatting across both approaches

âś… Preserve your investment in existing documentation

The Command That Changes Everything

# NEW: Generate docs using JSDoc comments when available
syntax-scribe docs document -s "./src" -d "./docs" --useJsDocs -l your-license-key

# ORIGINAL: Pure automatic analysis (still available)
syntax-scribe docs document -s "./src" -d "./docs" -l your-license-key

Why This Matters

🏢 For Teams with Existing JSDoc

Many codebases already have JSDoc comments scattered throughout their functions and classes. Previously, Syntax Scribe would ignore these and generate documentation from scratch. Now, you can leverage that existing work while still getting automatic documentation for everything else.

🎯 Perfect Hybrid Approach

Not every function in your codebase needs detailed JSDoc comments, but some complex functions benefit from developer-written explanations. The --useJsDocs flag lets you be selective—document the complex stuff manually, let Syntax Scribe handle the rest.

⚡ Zero Disruption

Your existing workflow doesn't change. The flag is completely optional, and your existing commands will continue to work exactly as before.

See the Difference in Action

We've generated sample documentation sites to showcase both approaches:

Automatic Analysis (Original Approach)

JSDoc-Enhanced (New Approach)

Notice how the Three.js documentation includes detailed descriptions, parameter explanations, and usage examples that come directly from the developers' JSDoc comments—while still maintaining Syntax Scribe's beautiful formatting and organization.

When to Use Each Approach

Use Standard Mode (no flag) when:

  • 🚀 You want to get started immediately without any setup

  • 📝 Your codebase has minimal or inconsistent comments

  • ⚡ You prefer Syntax Scribe's automatic analysis style

  • 🔄 You want completely maintenance-free documentation

Use -useJsDocs Mode when:

  • 📚 Your codebase already has substantial JSDoc comments

  • 🎯 You want developer-written descriptions for complex functions

  • 🏢 Your team has established JSDoc standards you want to preserve

  • đź”— You want to maintain links to existing documentation investments

Real-World Example

Here's how the same function looks with both approaches:

Your Code:

/**
 * Calculates the monthly payment for a loan
 * @param {number} principal - The loan amount
 * @param {number} rate - Annual interest rate (as decimal)
 * @param {number} years - Loan term in years
 * @returns {number} Monthly payment amount
 * @example
 * calculatePayment(100000, 0.05, 30) // Returns ~536.82
 */
export function calculatePayment(principal, rate, years) {
  const monthlyRate = rate / 12;
  const numPayments = years * 12;
  return (principal * monthlyRate) / (1 - Math.pow(1 + monthlyRate, -numPayments));
}

With --useJsDocs:

### `calculatePayment(principal, rate, years): number`

Calculates the monthly payment for a loan

**Parameters:**
- `principal: number` - The loan amount
- `rate: number` - Annual interest rate (as decimal)
- `years: number` - Loan term in years

**Returns:** `number` - Monthly payment amount

**Example:**
```javascript
calculatePayment(100000, 0.05, 30) // Returns ~536.82


**Without `--useJsDocs`:**
```markdown
### `calculatePayment(principal: number, rate: number, years: number): number`

- **Parameters:**
  - `principal: number`
  - `rate: number`
  - `years: number`
- **Return Type:** `number`
- **Calls:** `Math.pow`

Both are valuable—the JSDoc version includes your custom descriptions and examples, while the automatic version provides consistent technical details and discovered function calls.

Getting Started

If you already have Syntax Scribe installed, the new flag is available immediately:

# Try it on your existing codebase
syntax-scribe docs document -s "./src" -d "./docs" --useJsDocs -l your-license-key

Don't have Syntax Scribe yet? Get started in 30 seconds:

npm install -g syntax-scribe

The Bottom Line

Documentation shouldn't be an either-or choice between automatic generation and manual comments. With the new --useJsDocs flag, you get the flexibility to use both approaches where they make the most sense.

Whether you're working with a legacy codebase full of JSDoc comments or a greenfield project that needs instant documentation, Syntax Scribe now adapts to your workflow, not the other way around.

Ready to try the new JSDoc support? Update Syntax Scribe today or explore our sample documentation sites to see both approaches in action.

Questions about the new feature? Check out our documentation or reach out to our team.

Syntax Scribe: Now even more flexible, still lightning fast.