From 017613a7fe75c50296f563e83090430cb06798bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Gonz=C3=A1lez?= Date: Mon, 6 Mar 2017 08:30:14 +0100 Subject: [PATCH] Fix #6 --- README.md | 2 ++ package.json | 4 +++- src/api.plugin.coffee | 6 +++--- test/docpad.coffee | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index aacd9bd..bd15346 100644 --- a/README.md +++ b/README.md @@ -85,3 +85,5 @@ and licensed under: - The incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://opensource.org/licenses/mit-license.php) + + diff --git a/package.json b/package.json index 764f95e..028351d 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,9 @@ "version": "2.1.0", "description": "DocPad plugin that inyects your custom REST api inside a site built with Docpad.", "homepage": "https://github.com/univunix/docpad-plugin-api", - "license": "MIT", + "license": { + "type": "MIT" + }, "keywords": [ "docpad", "docpad-plugin", diff --git a/src/api.plugin.coffee b/src/api.plugin.coffee index 9c84df1..b888483 100644 --- a/src/api.plugin.coffee +++ b/src/api.plugin.coffee @@ -10,8 +10,8 @@ module.exports = (BasePlugin) -> config: baseApiUrl: '/api' source: [ - uri: '', - uri: '' + file: '', + file: '' ] serverExtend: (opts) -> @@ -21,7 +21,7 @@ module.exports = (BasePlugin) -> rootPath = docpad.getConfig().rootPath customApis = [] for src in @config.source - customApis.push(require(path.join(rootPath, src.uri))) + customApis.push(require(path.join(rootPath, src.file))) # Default route. server.get "#{@config.baseApiUrl}/engine/version", (req, res, next) -> diff --git a/test/docpad.coffee b/test/docpad.coffee index 51afc16..2784eb6 100644 --- a/test/docpad.coffee +++ b/test/docpad.coffee @@ -8,7 +8,7 @@ docpadConfig = { api: baseApiUrl: '/APIURLTEST' source: [ - uri: 'api/api-test.js' + file: 'api/api-test.js' ] }