diff --git a/.gitignore b/.gitignore index a6047cb..1900b08 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ tests/*.diff spec/ spec-runner/ node_modules/ +package.json +package-lock.json diff --git a/package.json b/package.json deleted file mode 100644 index dd8e1ef..0000000 --- a/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dependencies": { - "async": "*" - }, - "scripts": { - "clean": "rm -rf package-lock.json node_modules/ spec/", - "install-tests": "npm install; git clone https://github.com/mustache/spec.git spec", - "test": "node run-spec.js spec/specs/*.json" - } -} diff --git a/run-spec b/run-spec new file mode 100755 index 0000000..8d8676d --- /dev/null +++ b/run-spec @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# Create a package.json so the dependency package is installed in the local +# directory +echo '{"private":true, "dependencies":{"async": "*"}}' > package.json +npm install + +# Install or update the specs +if [[ ! -d spec ]]; then + git clone https://github.com/mustache/spec.git spec +else + ( + cd spec; + git pull + ) +fi + +# Actually run the specs +node run-spec.js spec/specs/*.json +