diff --git a/CHANGELOG.md b/CHANGELOG.md index bab7c5f..ccd1d34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## v0.6.2 + +- Bug fix for plugins. +- Log whole error if error is due to plugins. + ## v0.6.0 - v0.6.1 - Used remarkable to parser markdown. diff --git a/package.json b/package.json index 22e105c..dcb0923 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ulka", - "version": "0.6.1", + "version": "0.6.2", "description": "Ulka - A simpler static site generator written in JavaScript", "main": "./src/index.js", "bin": { diff --git a/src/utils/helpers.js b/src/utils/helpers.js index adcff02..1f3bfb6 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -125,11 +125,13 @@ const getPlugins = (pluginArr, cwd) => { let options = {} if (typeof plugin === "string") { - if (existsSync(cwd, plugin)) plugin = path.join(cwd, plugin) + if (existsSync(path.join(cwd, plugin))) { + plugin = path.join(cwd, plugin) + } pPath = require.resolve(plugin) } else if (typeof plugin === "object" && plugin.resolve) { - if (existsSync(cwd, plugin.resolve)) + if (existsSync(path.join(cwd, plugin.resolve))) plugin.resolve = path.join(cwd, plugin.resolve) pPath = require.resolve(plugin.resolve) @@ -155,6 +157,7 @@ const getPlugins = (pluginArr, cwd) => { return plugins } catch (e) { + console.log(e) log.error("Error while getting plugins") process.exit(0) }