markdown-shell-script

1.0.0 • Public • Published

markdown-shell-script

Transforms shell commands and code snippets from a markdown file into a shell script

Installation

yarn add markdown-shell-script or npm install markdown-shell-script

Usage

const markdownShellScript = require("markdown-shell-script");
 
markdownShellScript(`
# Markdown example
 
\`\`\`bash
# Go to root folder
cd ~
# Create hello-world directory
mkdir hello-world
\`\`\`
 
\`\`\`js {hello-world/greeting.js}
console.log("Hello world")
\`\`\`
 
\`\`\`bash
node hello-world/greeting.js
\`\`\`
`).then(console.log)
 
/*
#! /bin/sh
 
# Go to root folder
cd ~
# Create hello-world directory
mkdir hello-world
 
cat > hello-world/greeting.js << 'EOF'
console.log("Hello world")
EOF
 
node hello-world/greeting.js
*/

Readme

Keywords

none

Package Sidebar

Install

npm i markdown-shell-script

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

173 kB

Total Files

17

Last publish

Collaborators

  • eljuli