Adding support for node.js

This commit is contained in:
Adam Sanderson 2010-12-30 12:52:16 -07:00
parent 9cfa17e13d
commit fcd76d89ee
2 changed files with 15 additions and 0 deletions

View File

@ -41,6 +41,17 @@ register :python do
add python_paths, :class=>Qwandry::LibraryRepository, :reject => /\.(py[oc])|(egg-info)$/
end
# Add node.js repositories:
register :node do
# Execute a node script to find all of the load paths:
node_script_path = File.join(File.dirname(__FILE__),'probe_node.js')
node_paths = `node #{node_script_path}` rescue ''
node_paths = node_paths.split("\n")
# Add the python paths, instruct Qwandry to skip any compiled files when trying to match a file/library:
add node_paths
end
# Qwandry is a ruby app after all, so activate ruby and gem by default. Other defaults can be set
# with a custom init.rb
default :ruby, :gem

View File

@ -0,0 +1,4 @@
// If anyone knows a way to pipe a one liner into node to do this,
// I'm all ears.
var sys = require('sys')
sys.puts(require.paths.join("\n"))