Adding support for node.js
This commit is contained in:
parent
9cfa17e13d
commit
fcd76d89ee
|
@ -41,6 +41,17 @@ register :python do
|
||||||
add python_paths, :class=>Qwandry::LibraryRepository, :reject => /\.(py[oc])|(egg-info)$/
|
add python_paths, :class=>Qwandry::LibraryRepository, :reject => /\.(py[oc])|(egg-info)$/
|
||||||
end
|
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
|
# Qwandry is a ruby app after all, so activate ruby and gem by default. Other defaults can be set
|
||||||
# with a custom init.rb
|
# with a custom init.rb
|
||||||
default :ruby, :gem
|
default :ruby, :gem
|
|
@ -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"))
|
Loading…
Reference in New Issue