diff --git a/.travis.yml b/.travis.yml index 97ef36f89..28fafd5c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,8 @@ node_js: script: - npm test - npm run build - # - npm link - # - danger + - npm run link + - danger after_script: - npm run flow diff --git a/README.md b/README.md index f31d1142d..dac354bdc 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ flow-typed install ( and maybe `flow-typed install jest@14`) -You can run the `danger` command globally from your dev build by running `npm link`. +You can run the `danger` command globally from your dev build by running `npm run link`. ### What is the TODO? diff --git a/package.json b/package.json index 40804c24c..d2ed49b92 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Automate your culture", "main": "distribution/danger.js", "bin": { - "danger": "distribution/commands/runner.js" + "danger": "distribution/commands/danger.js" }, "jest": { "verbose": true, @@ -20,7 +20,8 @@ "lint": "eslint ./source", "fix": "eslint ./source --fix", "build": "babel source --out-dir distribution --source-maps", - "buildwatch": "babel source --watch --out-dir distribution" + "buildwatch": "babel source --watch --out-dir distribution", + "link": "npm run build ; chmod +x distribution/commands/danger.js ; npm link" }, "repository": { "type": "git", diff --git a/source/commands/app.js b/source/commands/app.js deleted file mode 100644 index 2ec571167..000000000 --- a/source/commands/app.js +++ /dev/null @@ -1,13 +0,0 @@ -var program = require("commander") -console.log("ASD") -import { version } from "../../package.json" - -// Provides the root node to the command-line architecture - -program - .version(version) - .command("run", "Runs danger on your local system", {isDefault: true}) - .command("init", "Creates a new Dangerfile.js") - .command("local", "Runs your changes against ") - -export default program diff --git a/source/commands/danger.js b/source/commands/danger.js index e3a3d8e30..924b00e2c 100644 --- a/source/commands/danger.js +++ b/source/commands/danger.js @@ -1,3 +1,4 @@ +#! /usr/bin/env node // @flow // This is needed so that other files can use async funcs import "babel-polyfill"