mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-11 16:16:09 +03:00
Build and run the Elm app
This commit is contained in:
parent
264b2d84a4
commit
d14848d264
@ -10,11 +10,6 @@ async function runElmMake() {
|
||||
process.chdir('..');
|
||||
}
|
||||
|
||||
|
||||
console.warn = () => { }
|
||||
|
||||
const Elm = require('./dist');
|
||||
|
||||
function get(url) {
|
||||
return new Promise((resolve, reject) => {
|
||||
https.get(url, (resp) => {
|
||||
@ -46,10 +41,16 @@ async function downloadFiles() {
|
||||
return [elmJson, docsJson];
|
||||
}
|
||||
|
||||
function createFile([elmJson, docsJson]) {
|
||||
const app = Elm.Elm.DependencyCreator.init({
|
||||
async function createFile([elmJson, docsJson]) {
|
||||
await runElmMake();
|
||||
|
||||
const oldWarn = console.warn;
|
||||
console.warn = () => { }
|
||||
|
||||
const app = require('./elm-stuff/app.js').Elm.DependencyCreator.init({
|
||||
flags: { elmJson, docsJson }
|
||||
});
|
||||
console.warn = oldWarn;
|
||||
|
||||
app.ports.sendToJs.subscribe(async ([filePath, source]) => {
|
||||
const relativeFilePath = path.resolve(process.cwd(), filePath);
|
||||
|
Loading…
Reference in New Issue
Block a user