@modernpoacher/deps 2.0.5 → 2.0.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Update NPM package dependencies from the command line",
5
5
  "keywords": [
6
6
  "deps",
@@ -117,6 +117,34 @@ export const getNoSaveParameter = (s, commands) => s ? commands : commands.conca
117
117
  */
118
118
  export const getSaveExactParameter = (commands) => commands.concat(' --save-exact')
119
119
 
120
+ /**
121
+ * @function getExportPath
122
+ *
123
+ * Get the export PATH shell script
124
+ *
125
+ * @param {String} commands
126
+ *
127
+ * @return {String}
128
+ */
129
+ export const getExportPath = (commands) => `
130
+ export PATH=/usr/local/bin:$PATH &> /dev/null
131
+ ${commands}
132
+ `
133
+
134
+ /**
135
+ * @function getNvm
136
+ *
137
+ * Get the NVM shell script
138
+ *
139
+ * @param {String} commands
140
+ *
141
+ * @return {String}
142
+ */
143
+ export const getNvm = (commands) => `
144
+ . "${NVM}" 2> /dev/null
145
+ ${commands}
146
+ `
147
+
120
148
  /**
121
149
  * @function getCommands
122
150
  *
@@ -129,11 +157,13 @@ export const getSaveExactParameter = (commands) => commands.concat(' --save-exac
129
157
  */
130
158
 
131
159
  export const getCommands = PLATFORM === 'win32'
132
- ? (directory = DIRECTORY, commands = 'npm i') => tidy(commands)
133
- : (directory = DIRECTORY, commands = 'npm i') => tidy(`
134
- export PATH=/usr/local/bin:$PATH &> /dev/null
135
- . "${NVM}" 2> /dev/null
160
+ ? (directory = DIRECTORY, commands = 'npm i') => tidy(`
161
+ echo Directory is \\"${directory}\\"
136
162
  ${commands}
163
+ `)
164
+ : (directory = DIRECTORY, commands = 'npm i') => tidy(`
165
+ echo Directory is \\"${directory}\\"
166
+ ${getExportPath(getNvm(commands))}
137
167
  `)
138
168
 
139
169
  /**