Skip to content

Commit

Permalink
Install 'linter' automatically upon first install
Browse files Browse the repository at this point in the history
Addresses AtomLinter#7

Instead of a manual requirement for linter to be preinstalled,
use atom-package-deps to install 'linter' when activated (if not
already installed).  This allows for much simpler installation.
  • Loading branch information
trevershick committed Nov 18, 2015
1 parent 7d2d8f2 commit 0869ed9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ linter-clojure
This linter plugin for [Linter](https://github.com/AtomLinter/Linter) provides an interface to [clojure-x.x.x.jar](http://clojure.org/). It will be used with files that have the “Clojure” syntax.

## Installation
Linter package must be installed in order to use this plugin. If Linter is not installed, please follow the instructions [here](https://github.com/AtomLinter/Linter).
On first activation the plugin will install all dependencies automatically, you no longer have to worry about installing Linter.

## Settings
You can configure linter-clojure by editing ~/.atom/config.cson (choose Open Your Config in Atom menu):
Expand Down
3 changes: 3 additions & 0 deletions lib/init.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ module.exports =
type: 'string'
default: 'clojure-x.x.x.jar'

activate: ->
require("atom-package-deps").install("linter-clojure")

provideLinter: ->
helpers = require('atom-linter')
regex = 'RuntimeException:(?<message>.*), compiling:(.*):(?<line>\\d+):(?<col>\\d+)'
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
}
},
"dependencies": {
"atom-linter": "^3.2.0"
}
"atom-linter": "^3.2.0",
"atom-package-deps": "^2.0.1"
},
"package-deps": [
"linter"
]
}

0 comments on commit 0869ed9

Please sign in to comment.