Update installation process

This commit is contained in:
Richard Feldman
2016-03-06 05:22:23 -08:00
parent fe473e1041
commit 28ff51da62
5 changed files with 40 additions and 6 deletions

View File

@@ -7,4 +7,10 @@ fs.readdirSync("stages").forEach(function(stage) {
console.log("Installing packages for " + cwd); console.log("Installing packages for " + cwd);
execSync("elm-package install --yes", { cwd: cwd }); execSync("elm-package install --yes", { cwd: cwd });
var testCwd = path.join(cwd, "test");
if (fs.existsSync(testCwd)) {
execSync("elm-package install --yes", { cwd: testCwd });
}
}); });

View File

@@ -4,18 +4,15 @@
"repository": "https://github.com/rtfeldman/elm-workshop.git", "repository": "https://github.com/rtfeldman/elm-workshop.git",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"source-directories": [ "source-directories": [
"src", "src"
"test"
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.1.1 <= v < 4.0.0",
"elm-lang/core": "3.0.0 <= v < 4.0.0", "elm-lang/core": "3.0.0 <= v < 4.0.0",
"evancz/elm-effects": "2.0.0 <= v < 3.0.0", "evancz/elm-effects": "2.0.0 <= v < 3.0.0",
"evancz/elm-html": "4.0.0 <= v < 5.0.0", "evancz/elm-html": "4.0.0 <= v < 5.0.0",
"evancz/elm-http": "3.0.0 <= v < 4.0.0", "evancz/elm-http": "3.0.0 <= v < 4.0.0",
"evancz/start-app": "2.0.0 <= v < 3.0.0", "evancz/start-app": "2.0.0 <= v < 3.0.0"
"laszlopandy/elm-console": "1.0.3 <= v < 2.0.0"
}, },
"elm-version": "0.16.0 <= v < 0.17.0" "elm-version": "0.16.0 <= v < 0.17.0"
} }

View File

@@ -5,7 +5,7 @@
"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_modules/.bin/elm-live src/Main.elm --open -- --output=elm.js",
"test": "../../node_modules/.bin/elm-test test/TestRunner.elm", "test": "node test.js",
"install": "npm run build" "install": "npm run build"
}, },
"repository": { "repository": {

10
stages/5/test.js Normal file
View File

@@ -0,0 +1,10 @@
var fs = require("fs");
var execSync = require("child_process").execSync;
var path = require("path");
var testDir = path.join(__dirname, "test");
var binPath = path.join(__dirname, "..", "..", "node_modules", ".bin");
var elmTestPath = path.join(binPath, "elm-test");
var elmMakePath = path.join(binPath, "elm-make");
execSync(elmMakePath + " TestRunner.elm --yes --output /dev/null", { cwd: testDir });
execSync(elmTestPath + " TestRunner.elm", { cwd: testDir, stdio: "inherit" });

View File

@@ -0,0 +1,21 @@
{
"version": "1.0.0",
"summary": "Like GitHub, but for Elm stuff.",
"repository": "https://github.com/rtfeldman/elm-workshop.git",
"license": "BSD-3-Clause",
"source-directories": [
".",
"../src"
],
"exposed-modules": [],
"dependencies": {
"deadfoxygrandpa/elm-test": "3.1.1 <= v < 4.0.0",
"elm-lang/core": "3.0.0 <= v < 4.0.0",
"evancz/elm-effects": "2.0.0 <= v < 3.0.0",
"evancz/elm-html": "4.0.0 <= v < 5.0.0",
"evancz/elm-http": "3.0.0 <= v < 4.0.0",
"evancz/start-app": "2.0.0 <= v < 3.0.0",
"laszlopandy/elm-console": "1.0.3 <= v < 2.0.0"
},
"elm-version": "0.16.0 <= v < 0.17.0"
}