Pass through environment to CLI app for secrets.

This commit is contained in:
Dillon Kearns 2019-10-24 08:58:44 -07:00
parent 69e465d511
commit 5754bfb186
2 changed files with 6 additions and 2 deletions

View File

@ -12,7 +12,9 @@ function runElm(callback) {
const warnOriginal = console.warn;
console.warn = function() {};
eval(data.toString());
const app = Elm.Main.init({ flags: { imageAssets: {} } });
const app = Elm.Main.init({
flags: { secrets: process.env }
});
app.ports.toJsPort.subscribe(payload => {
process.chdir(startingDir);

View File

@ -8,7 +8,9 @@ module.exports = function pagesInit(
document.addEventListener("DOMContentLoaded", function() {
let app = mainElmModule.init({
flags: {}
flags: {
secrets: null
}
});
app.ports.toJsPort.subscribe((