We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fd2d62 commit caa7e31Copy full SHA for caa7e31
lib/resolve_theme.js
@@ -6,11 +6,15 @@ var path = require('path'),
6
/**
7
* Given the name of a theme as a module, return the directory it
8
* resides in, or throw an error if it is not found
9
- * @param {string} theme the module name
+ * @param {string} [theme='documentation-theme-default'] the module name
10
* @throws {Error} if theme is not found
11
* @returns {string} directory
12
*/
13
function resolveTheme(theme) {
14
+ if (!theme) {
15
+ return path.dirname(resolve.sync('documentation-theme-default', { basedir: __dirname }));
16
+ }
17
+
18
try {
19
return path.dirname(resolve.sync(theme, { basedir: process.cwd() }));
20
} catch (e) {
0 commit comments