Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nodeJS + jslint : where to install for mac OSX?

I've installed nodeJS ( from http://nodejs.org/ ). This has installed nodeJS & npm. Then I run npm install jslint.

The package manager create a folder in my current working directory, and place the required file in it.

Then I guess I should do a symlink in my /usr/local/bin/ folder in order to have a global jslint command.

But the whole point is that following that procedure, the jslint files are inside a specific project folder ( that was my current working folder of that moment ), and not in a generic place.

How should I proceed to have a clean installation ?

like image 697
FMaz008 Avatar asked Jan 18 '12 18:01

FMaz008


1 Answers

I just discovered a -g option, witch install the package globally:

npm install -g jslint

install jslint in /usr/local/bin/jslint , and I can now run jslint in the shell directly without having to create a symlink :)

If you are getting installation errors you might need

sudo npm install -g jslint

although normally that's not required

like image 70
FMaz008 Avatar answered Sep 22 '22 07:09

FMaz008