Skip to content
This repository was archived by the owner on Jul 5, 2026. It is now read-only.

camacho/markdown-magic-install-command

Repository files navigation

📦 This package has moved. It now lives in the markdown-magic-plugins monorepo at packages/install-command. This repository is archived; issues and contributions go to the monorepo.

Install command plugin

Add install command to markdown files via markdown-magic

Install

npm add -D markdown-magic-install-command markdown-magic@^4

Adding the plugin

See example.js for usage.

import path from 'path';
import { markdownMagic } from 'markdown-magic';
import INSTALLCMD from './index.js';

const config = {
  matchWord: 'AUTO-GENERATED-CONTENT',
  transforms: {
    INSTALLCMD,
  },
};

const markdownPath = path.join(import.meta.dirname, 'README.md');
await markdownMagic(markdownPath, config);

Usage in markdown

npm add --save-dev markdown-magic-install-command@3.0.0 markdown-magic@^4

Options

  • client (defaults to 'npm' unless bun.lock, bun.lockb, pnpm-lock.yaml, or yarn.lock found) - specify the client for the install command
  • flags (["--save"] by default) - any flags to be included (like -g)
  • peers (true by default) - include peer dependencies in install command
  • pkg (closest package.json by default) - package.json path (relative to the Markdown file)
  • exact (false by default) - add the exact version to the install command

About

Generate install command for npm packages

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors