dpnishant / jsprime

a javascript static security analysis tool
http://dpnishant.github.io/jsprime
Other
585 stars 103 forks source link

File paths in ''require'' contain full author homefolder path #4

Closed Karabur closed 11 years ago

Karabur commented 11 years ago

Like:

var esprima = require('/Users/nishantp/Desktop/jsprime-demo/jsprime-node/esprima.js');
var engine = require('/Users/nishantp/Desktop/jsprime-demo/jsprime-node/engine.js');
var analyzer = require('/Users/nishantp/Desktop/jsprime-demo/jsprime-node/analyzer.js');

Please remove them, since there is some peoples in the world what does't have the nishantp user :) The use of npm will be great also.

sarathisahoo commented 11 years ago

Hi, You can say it as config changes. Users need to change this accordingly before running the script.

Thanks, Sarathi

Karabur commented 11 years ago

It is not a config, it is source code. If I need to modify the source code in order just to run the application - something wrong with the code. Actually all what needs to be done - just put a './' in a path. It will not require any 'configuration', will just work everywhere.

Doesn't look like over-complicated change for guys who claim to have js static analysis tool. Or you really need help with this 1 minute change and waiting for a pull request? :)

dpnishant commented 11 years ago

Fixed.

dmitris commented 11 years ago

Thanks for fixing this. You might also want to change the path in the commented block - https://github.com/dpnishant/jsprime/blob/ca6fca6503c4b08d1d6b3993015edebd4e0a30d3/jsprime-node/server.js#L6

var esprima = require('/Users/nishantp/Desktop/jsprime-demo/jsprime-node/esprima.js');