hike

JavaScript port of Ruby's Hike, a library for finding files in a set of paths.

npm install hike
339 downloads in the last day
2 200 downloads in the last week
9 330 downloads in the last month

hike

Build Status

Javascript port of Hike (Ruby) - a library for finding files in a set of paths. Use it to implement search paths, load paths, and the like.

See API docs for details on methods.

Examples

Find JavaScript files in this project:

trail = new hike.Trail("/home/ixti/Projects/hike-js");
trail.extensions.append(".js");
trail.paths.append("lib", "test");

trail.find("hike/trail");
# => "/home/ixti/Projects/hike-js/lib/hike/trail.js"

trail.find("test_trail");
# => "/home/ixti/Projects/hike-js/test/test_trail.rb"

Explore your shell path:

trail = new hike.Trail("/");
trail.paths.append(process.env.PATH.split(":"));

trail.find("ls");
# => "/bin/ls"

trail.find("gem");
# => "/home/ixti/.rvm/rubies/ruby-1.9.2-p290/bin/gem"

Installation

$ npm install hike

License

Copyright (c) 2012 Vitaly Puzrin

Released under the MIT license. See LICENSE for details.

npm loves you