Skip to content

Commit 017613a

Browse files
committed
Fix #6
1 parent 79ed383 commit 017613a

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,5 @@ and licensed under:
8585
- The incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://opensource.org/licenses/mit-license.php)
8686

8787
<!-- /LICENSE -->
88+
89+

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"version": "2.1.0",
44
"description": "DocPad plugin that inyects your custom REST api inside a site built with Docpad.",
55
"homepage": "https://github.com/univunix/docpad-plugin-api",
6-
"license": "MIT",
6+
"license": {
7+
"type": "MIT"
8+
},
79
"keywords": [
810
"docpad",
911
"docpad-plugin",

src/api.plugin.coffee

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ module.exports = (BasePlugin) ->
1010
config:
1111
baseApiUrl: '/api'
1212
source: [
13-
uri: '',
14-
uri: ''
13+
file: '',
14+
file: ''
1515
]
1616

1717
serverExtend: (opts) ->
@@ -21,7 +21,7 @@ module.exports = (BasePlugin) ->
2121
rootPath = docpad.getConfig().rootPath
2222
customApis = []
2323
for src in @config.source
24-
customApis.push(require(path.join(rootPath, src.uri)))
24+
customApis.push(require(path.join(rootPath, src.file)))
2525

2626
# Default route.
2727
server.get "#{@config.baseApiUrl}/engine/version", (req, res, next) ->

test/docpad.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ docpadConfig = {
88
api:
99
baseApiUrl: '/APIURLTEST'
1010
source: [
11-
uri: 'api/api-test.js'
11+
file: 'api/api-test.js'
1212
]
1313
}
1414

0 commit comments

Comments
 (0)