lib/vx/builder/script_builder/nodejs.rb in vx-builder-0.5.21 vs lib/vx/builder/script_builder/nodejs.rb in vx-builder-0.5.22
- old
+ new
@@ -4,10 +4,11 @@
class Nodejs < Base
DEFAULT_NODE = '0.10'
NPM_PACKAGES = '~/.npm-packages'
+ BOWER_COMPONENTS = '~/.bower_components'
def call(env)
if enabled?(env)
vxvm_install(env, 'nodejs', node_version(env))
@@ -29,15 +30,18 @@
i << trace_sh_command("npm test")
end
do_before_install(env) do |i|
i << "mkdir -p #{NPM_PACKAGES}"
+ i << "mkdir -p #{BOWER_COMPONENTS}"
i << trace_sh_command("npm config set prefix=#{NPM_PACKAGES}")
+ i << trace_sh_command("export bower_directory=#{BOWER_COMPONENTS}")
i << "export PATH=$PATH:#{NPM_PACKAGES}/bin"
end
do_cached_directories(env) do |i|
i << NPM_PACKAGES
+ i << BOWER_COMPONENTS
end
end
app.call(env)
end