engineyard-serverside 2.6.12 → 2.6.13
Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,17 @@ module EY
|
|
10
10
|
|
11
11
|
def install
|
12
12
|
shell.status "Installing npm packages (package.json detected)"
|
13
|
-
run %{cd #{paths.active_release} && export GIT_SSH="#{ENV['GIT_SSH']}" && npm install}
|
13
|
+
run %{cd #{paths.active_release} && export GIT_SSH="#{ENV['GIT_SSH']}" && npm install #{npm_install_options.join(" ")}}
|
14
|
+
end
|
15
|
+
|
16
|
+
def npm_install_options
|
17
|
+
options = []
|
18
|
+
options += ['--production'] if npm_production?
|
19
|
+
options
|
20
|
+
end
|
21
|
+
|
22
|
+
def npm_production?
|
23
|
+
ENV['NODE_ENV'] == 'production'
|
14
24
|
end
|
15
25
|
end
|
16
26
|
end
|