diff options
author | butlerx | 2017-06-01 09:47:52 +0100 |
---|---|---|
committer | butlerx | 2017-06-01 10:12:40 +0100 |
commit | c531d96f6617663dae8534aba2623f541c7d12de (patch) | |
tree | 751d75bedfcde0a0aee6ee1d7ec17e7cc76c2dc1 /lib/utils.js | |
parent | e5834c077f203aa5c80f777f91e0bf650614241d (diff) |
check if reveal theme exists
Diffstat (limited to '')
-rw-r--r-- | lib/utils.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js index d9289dca..fe70a0f1 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -1,4 +1,6 @@ 'use strict' +const fs = require('fs') +const path = require('path') exports.isSQLite = function isSQLite (sequelize) { return sequelize.options.dialect === 'sqlite' @@ -23,3 +25,10 @@ exports.getImageMimeType = function getImageMimeType (imagePath) { return undefined } } + +exports.isRevealTheme = function isRevealTheme (theme) { + if (fs.existsSync(path.join(process.cwd(), 'public', 'build', 'reveal.js', 'css', 'theme', theme + '.css'))) { + return theme + } + return undefined +} |