From 264b2d84a48a38d8ba31a52e8e792b3400728489 Mon Sep 17 00:00:00 2001 From: Jeroen Engels Date: Fri, 12 Mar 2021 17:33:54 +0100 Subject: [PATCH] Add function to compile the Elm app --- create-dependency/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/create-dependency/index.js b/create-dependency/index.js index 86685bd9..e1d53e57 100644 --- a/create-dependency/index.js +++ b/create-dependency/index.js @@ -1,6 +1,15 @@ const path = require('path'); const https = require('https'); 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 = () => { } @@ -24,7 +33,7 @@ const packageName = process.argv[2]; if (!packageName) { console.error(`Need to pass in a package name. For instance: - + node create-dependency.js elm/html `) }