projects
/
working
/
eg-antora.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
825c68f
)
add env key to UI model to preview
author
Dan Allen
<dan@opendevise.com>
Sat, 23 Jun 2018 23:02:33 +0000
(17:02 -0600)
committer
Dan Allen
<dan@opendevise.com>
Sat, 23 Jun 2018 23:02:33 +0000
(17:02 -0600)
tasks/build-preview.js
patch
|
blob
|
history
diff --git
a/tasks/build-preview.js
b/tasks/build-preview.js
index
53c7272
..
77c8411
100644
(file)
--- a/
tasks/build-preview.js
+++ b/
tasks/build-preview.js
@@
-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, '_')