Fix 5's npm run watch on Windows

This commit is contained in:
Richard Feldman
2016-03-06 11:28:02 -08:00
parent 28434a83b1
commit e7c4767f8f
2 changed files with 8 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
"description": "Like GitHub, but for Elm stuff.", "description": "Like GitHub, but for Elm stuff.",
"scripts": { "scripts": {
"build": "elm-make src/Main.elm --output elm.js", "build": "elm-make src/Main.elm --output elm.js",
"watch": "../../node_modules/.bin/elm-live src/Main.elm --open -- --output=elm.js", "watch": "node watch.js",
"test": "node test.js", "test": "node test.js",
"install": "npm run build" "install": "npm run build"
}, },

7
stages/5/watch.js Normal file
View File

@@ -0,0 +1,7 @@
var fs = require("fs");
var execSync = require("child_process").execSync;
var path = require("path");
var binPath = path.join(__dirname, "..", "..", "node_modules", ".bin");
var watchPath = path.join(binPath, "elm-live");
execSync(watchPath + " src/Main.elm --open -- --output=elm.js", { stdio: "inherit" });