Miss any of our Open RFC calls?Watch the recordings here! »

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
*/

Keywords

none

Install

npm i markdown-shell-script

DownloadsWeekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

173 kB

Total Files

17

Last publish

Collaborators

  • avatar