Skip to content

Commit

Permalink
Do not default include path to process.cwd(), fixes #166
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgtaylor committed Sep 14, 2015
1 parent 09aefd0 commit b2ed516
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.1.1 - 2015-09-14

* Fix the default include path behavior when outputting a file to use the basename of the input file rather than `process.cwd()`. Also updates documentation to mention this behavior and option. [#166](https://github.com/danielgtaylor/aglio/issues/166)

# 2.1.0 - 2015-09-11

* Add a `--include-path` option to set the path for relative includes. [#165](https://github.com/danielgtaylor/aglio/pull/165)
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ aglio --no-theme-condense -i input.apib -o output.html
# Render full-width page instead of fixed max width
aglio --theme-full-width -i input.apib -o output.html

# Set an explicit file include path and read from stdin
aglio --include-path /path/to/includes -i - -o output.html

# Output verbose error information with stack traces
aglio -i input.apib -o output.html --verbose
```
Expand Down Expand Up @@ -184,7 +187,7 @@ alio.render(blueprint, options, function (err, html, warnings) {
```

#### aglio.renderFile (inputFile, outputFile, options, callback)
Render an API Blueprint file and save the HTML to another file. The input/output file arguments are file paths. The options behaves the same as above for `aglio.render`.
Render an API Blueprint file and save the HTML to another file. The input/output file arguments are file paths. The options behaves the same as above for `aglio.render`, except that the `options.includePath` defaults to the basename of the input filename.

```javascript
aglio.renderFile('/tmp/input.apib', '/tmp/output.html', options, function (err, warnings) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aglio",
"version": "2.1.0",
"version": "2.1.1",
"description": "An API Blueprint renderer with theme support",
"main": "lib/main.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion src/bin.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ parser = require('yargs')
.options('p', alias: 'port', describe: 'Port for local preview server', default: 3000)
.options('v', alias: 'version', describe: 'Display version number', default: false)
.options('c', alias: 'compile', describe: 'Compile the blueprint file', default: false)
.options('n', alias: 'include-path', describe: 'Base directory for relative includes', default: process.cwd())
.options('n', alias: 'include-path', describe: 'Base directory for relative includes')
.options('verbose', describe: 'Show verbose information and stack traces', default: false)
.epilog('See https://github.com/danielgtaylor/aglio#readme for more information')

Expand Down

0 comments on commit b2ed516

Please sign in to comment.