Skip to content

Commit ab3537e

Browse files
Merge pull request #1259 from opencomponents/remove-npm-prefix
[BUGFIX] remove prefix command on npm
2 parents 6e54155 + f6dfaa1 commit ab3537e

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

src/utils/npm-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const buildInstallCommand = (options: {
99
save?: boolean;
1010
isDev?: boolean;
1111
}) => {
12-
const args = ['install', '--prefix', options.installPath];
12+
const args = ['install'];
1313

1414
if (options.save) {
1515
args.push('--save-exact');

test/unit/utils-npm-utils.js

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ describe('utils : npm-utils', () => {
7474
},
7575
output: [
7676
'install',
77-
'--prefix',
78-
'path/to/component',
7977
'--save-exact',
8078
'--save-dev',
8179
'oc-template-jade-compiler',
@@ -89,14 +87,7 @@ describe('utils : npm-utils', () => {
8987
isDev: true,
9088
save: false
9189
},
92-
output: [
93-
'install',
94-
'--prefix',
95-
'path/to/component',
96-
'--no-save',
97-
'lodash',
98-
'--no-package-lock'
99-
]
90+
output: ['install', '--no-save', 'lodash', '--no-package-lock']
10091
},
10192
{
10293
input: {
@@ -107,8 +98,6 @@ describe('utils : npm-utils', () => {
10798
},
10899
output: [
109100
'install',
110-
'--prefix',
111-
'path/to/component',
112101
'--save-exact',
113102
'--save',
114103
'underscore',
@@ -119,8 +108,6 @@ describe('utils : npm-utils', () => {
119108
input: { dependency: 'oc-client@~1.2.3', installPath, save: false },
120109
output: [
121110
'install',
122-
'--prefix',
123-
'path/to/component',
124111
'--no-save',
125112
'oc-client@~1.2.3',
126113
'--no-package-lock'
@@ -184,8 +171,6 @@ describe('utils : npm-utils', () => {
184171
},
185172
output: [
186173
'install',
187-
'--prefix',
188-
'path/to/component',
189174
'--save-exact',
190175
'--save-dev',
191176
'oc-template-jade-compiler',
@@ -202,8 +187,6 @@ describe('utils : npm-utils', () => {
202187
},
203188
output: [
204189
'install',
205-
'--prefix',
206-
'path/to/component',
207190
'--no-save',
208191
'moment',
209192
'lodash',
@@ -219,8 +202,6 @@ describe('utils : npm-utils', () => {
219202
},
220203
output: [
221204
'install',
222-
'--prefix',
223-
'path/to/component',
224205
'--save-exact',
225206
'--save',
226207
'underscore',
@@ -236,8 +217,6 @@ describe('utils : npm-utils', () => {
236217
},
237218
output: [
238219
'install',
239-
'--prefix',
240-
'path/to/component',
241220
'--no-save',
242221
'oc-client@~1.2.3',
243222
'oc-template-react-compiler',

0 commit comments

Comments
 (0)