engineyard-serverside 2.6.12 → 2.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
|