markdown-shell-script
Transforms shell commands and code snippets from a markdown file into a shell script
Last updated 2 years ago by eljuli .
MIT · Original npm · Tarball · package.json
$ cnpm install markdown-shell-script 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (12)
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |