Suppress elm --optimize warnings.

This commit is contained in:
Dillon Kearns 2019-08-20 22:20:18 -07:00
parent c0e7ccd3ab
commit 740f334958

View File

@ -8,6 +8,8 @@ function runElm(callback) {
process.chdir(elmBaseDirectory);
compileToString([mainElmFile], {}).then(function(data) {
(function() {
const warnOriginal = console.warn;
console.warn = function() {};
eval(data.toString());
const app = Elm.Main.init({ flags: { imageAssets: {} } });
@ -15,6 +17,7 @@ function runElm(callback) {
process.chdir(startingDir);
callback(payload);
delete Elm;
console.warn = warnOriginal;
});
})();
});