diff --git a/bin/cli.js b/bin/cli.js index 90245af..233d97d 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -10,7 +10,7 @@ var fs = require('fs'), var basePath = process.cwd(), baseName, filePath, - revealPath = __dirname + '/../node_modules/reveal.js', + revealPath = path.resolve(require.resolve('reveal.js'), '..', '..'), theme = 'black', highlightTheme = 'zenburn'; diff --git a/bin/server.js b/bin/server.js index 34adcab..644b69b 100644 --- a/bin/server.js +++ b/bin/server.js @@ -20,7 +20,7 @@ var opts = { host: 'localhost', port: 1948, userBasePath: process.cwd(), - revealBasePath: path.join(serverBasePath, 'node_modules', 'reveal.js'), + revealBasePath: path.resolve(require.resolve('reveal.js'), '..', '..'), template: fs.readFileSync(path.join(serverBasePath, 'template', 'reveal.html')).toString(), templateListing: fs.readFileSync(path.join(serverBasePath, 'template', 'listing.html')).toString(), theme: 'black',