Skip to content

Commit

Permalink
Added bin for a proper CLI, markdown-include can now be required
Browse files Browse the repository at this point in the history
  • Loading branch information
Sethen committed Mar 8, 2015
1 parent 718988e commit 12da33d
Show file tree
Hide file tree
Showing 5 changed files with 320 additions and 296 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* [Make a table of contents](#make-a-table-of-contents)
* [How To Install](#how-to-install)
* [How To Use](#how-to-use)
* [From The Command Line](#from-the-command-line)
* [As A Module](#as-a-module)
* [markdown.json](#markdownjson)
* [How It Works](#how-it-works)

Expand Down Expand Up @@ -61,10 +63,22 @@ Use the `-g` flag if you wish to install markdown-include globally on your syste

# How To Use

markdown-include is very easy to use. Just include a `markdown.json` file in your project root with your options and run from the command line to compile your documents like so:
markdown-include is very easy to use whether on the command line or in your own node project. Each can help you compile your markdown files as you see fit. markdown-include does require that you define a `markdown.json` file with your options for compile. See below for all of the options available to you.

## From The Command Line

Run from the command line to compile your documents like so:

```
node_modules/bin/cli.js path/to/markdown.json
```

## As A Module

Just require in your node project:

```
node path/to/markdown-include.js path/to/markdown.json
var markdownInclude = require('markdown-include');
```

## markdown.json
Expand Down
3 changes: 3 additions & 0 deletions bin/cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node

require('../markdown-include').compileFiles(process.argv[2]);
16 changes: 14 additions & 2 deletions docs/how_to_use.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
# How To Use !heading

markdown-include is very easy to use. Just include a `markdown.json` file in your project root with your options and run from the command line to compile your documents like so:
markdown-include is very easy to use whether on the command line or in your own node project. Each can help you compile your markdown files as you see fit. markdown-include does require that you define a `markdown.json` file with your options for compile. See below for all of the options available to you.

## From The Command Line !heading

Run from the command line to compile your documents like so:

```
node_modules/bin/cli.js path/to/markdown.json
```

## As A Module !heading

Just require in your node project:

```
node path/to/markdown-include.js path/to/markdown.json
var markdownInclude = require('markdown-include');
```

## markdown.json !heading
Expand Down
Loading

0 comments on commit 12da33d

Please sign in to comment.