mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2025-01-06 22:39:41 +03:00
Suppress elm --optimize warnings.
This commit is contained in:
parent
c0e7ccd3ab
commit
740f334958
@ -8,6 +8,8 @@ function runElm(callback) {
|
|||||||
process.chdir(elmBaseDirectory);
|
process.chdir(elmBaseDirectory);
|
||||||
compileToString([mainElmFile], {}).then(function(data) {
|
compileToString([mainElmFile], {}).then(function(data) {
|
||||||
(function() {
|
(function() {
|
||||||
|
const warnOriginal = console.warn;
|
||||||
|
console.warn = function() {};
|
||||||
eval(data.toString());
|
eval(data.toString());
|
||||||
const app = Elm.Main.init({ flags: { imageAssets: {} } });
|
const app = Elm.Main.init({ flags: { imageAssets: {} } });
|
||||||
|
|
||||||
@ -15,6 +17,7 @@ function runElm(callback) {
|
|||||||
process.chdir(startingDir);
|
process.chdir(startingDir);
|
||||||
callback(payload);
|
callback(payload);
|
||||||
delete Elm;
|
delete Elm;
|
||||||
|
console.warn = warnOriginal;
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user