mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-12 00:18:32 +03:00
Add function to compile the Elm app
This commit is contained in:
parent
2cdabdde79
commit
264b2d84a4
@ -1,6 +1,15 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const https = require('https');
|
const https = require('https');
|
||||||
const fs = require('fs').promises;
|
const fs = require('fs').promises;
|
||||||
|
const util = require('util');
|
||||||
|
const exec = util.promisify(require('child_process').exec);
|
||||||
|
|
||||||
|
async function runElmMake() {
|
||||||
|
process.chdir('create-dependency/');
|
||||||
|
await exec('npx elm make src/DependencyCreator.elm --output elm-stuff/app.js');
|
||||||
|
process.chdir('..');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
console.warn = () => { }
|
console.warn = () => { }
|
||||||
|
|
||||||
@ -24,7 +33,7 @@ const packageName = process.argv[2];
|
|||||||
|
|
||||||
if (!packageName) {
|
if (!packageName) {
|
||||||
console.error(`Need to pass in a package name. For instance:
|
console.error(`Need to pass in a package name. For instance:
|
||||||
|
|
||||||
node create-dependency.js elm/html
|
node create-dependency.js elm/html
|
||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user