add env key to UI model to preview
authorDan Allen <dan@opendevise.com>
Sat, 23 Jun 2018 23:02:33 +0000 (17:02 -0600)
committerDan Allen <dan@opendevise.com>
Sat, 23 Jun 2018 23:02:33 +0000 (17:02 -0600)
tasks/build-preview.js

index 53c7272..77c8411 100644 (file)
@@ -23,6 +23,7 @@ module.exports = async (src, dest, siteSrc, siteDest, sink) => {
       map((file, next) => {
         const compiledLayout = layouts[file.stem === '404' ? '404.hbs' : 'default.hbs']
         const siteRootPath = path.relative(path.dirname(file.path), path.resolve(siteSrc))
+        uiModel.env = process.env
         uiModel.siteRootPath = siteRootPath
         uiModel.siteRootUrl = path.join(siteRootPath, 'index.html')
         uiModel.uiRootPath = path.join(siteRootPath, '_')