Skip to content

Commit 87c3902

Browse files
authored
Merge pull request #1240 from mansona/fix-remote-blueprints
Fix custom blueprints
2 parents 257f5d7 + 05ebc8a commit 87c3902

File tree

2 files changed

+28
-41
lines changed

2 files changed

+28
-41
lines changed

src/get-start-and-end-commands.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function getArgs({
109109
args.push(`-dir=${directoryName}`);
110110
}
111111

112-
args.push('-sg');
112+
args.push('--skip-git');
113113

114114
let _blueprint;
115115
if (blueprint.path) {
@@ -130,8 +130,7 @@ function getArgs({
130130

131131
return [
132132
...args,
133-
'-sn',
134-
'-sb',
133+
'--skip-npm',
135134
'-b',
136135
_blueprint,
137136
...blueprint.options
@@ -175,7 +174,7 @@ function runEmberRemotely({
175174
let isGlimmer = blueprint.packageName === glimmerPackageName && blueprint.name === glimmerPackageName;
176175

177176
if (isCustomBlueprint || isGlimmer) {
178-
args = [`ember-cli@${lastNode8Version}`, ...args];
177+
args = ['ember-cli@latest', ...args];
179178
// args = ['-p', 'github:ember-cli/ember-cli#cfb9780', 'ember', 'new', projectName, `-dir=${directoryName}, '-sg', -sn', '-b', `${blueprint.packageName}@${blueprint.version}`];
180179
} else {
181180
args = ['-p', `ember-cli@${blueprint.version}`, 'ember', ...args];

test/unit/get-start-and-end-commands-test.js

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,8 @@ describe(_getStartAndEndCommands, function() {
121121
path.normalize(`${packageRoot}/bin/ember`),
122122
'new',
123123
projectName,
124-
'-sg',
125-
'-sn',
126-
'-sb',
124+
'--skip-git',
125+
'--skip-npm',
127126
'-b',
128127
'app'
129128
],
@@ -152,9 +151,8 @@ describe(_getStartAndEndCommands, function() {
152151
commandName,
153152
'new',
154153
projectName,
155-
'-sg',
156-
'-sn',
157-
'-sb',
154+
'--skip-git',
155+
'--skip-npm',
158156
'-b',
159157
'app'
160158
],
@@ -296,9 +294,8 @@ describe(_getStartAndEndCommands, function() {
296294
path.normalize(`${packageRoot}/bin/ember`),
297295
'new',
298296
projectName,
299-
'-sg',
300-
'-sn',
301-
'-sb',
297+
'--skip-git',
298+
'--skip-npm',
302299
'-b',
303300
blueprintPath
304301
],
@@ -335,12 +332,11 @@ describe(_getStartAndEndCommands, function() {
335332

336333
expect(npxStub.args).to.deep.equal([[
337334
[
338-
`${packageName}@3.16`,
335+
`${packageName}@latest`,
339336
'new',
340337
projectName,
341-
'-sg',
342-
'-sn',
343-
'-sb',
338+
'--skip-git',
339+
'--skip-npm',
344340
'-b',
345341
blueprintPath
346342
],
@@ -385,9 +381,8 @@ describe(_getStartAndEndCommands, function() {
385381
path.normalize(`${packageRoot}/bin/ember`),
386382
'new',
387383
projectName,
388-
'-sg',
389-
'-sn',
390-
'-sb',
384+
'--skip-git',
385+
'--skip-npm',
391386
'-b',
392387
baseBlueprint.name,
393388
...baseBlueprint.options
@@ -441,9 +436,8 @@ describe(_getStartAndEndCommands, function() {
441436
commandName,
442437
'new',
443438
projectName,
444-
'-sg',
445-
'-sn',
446-
'-sb',
439+
'--skip-git',
440+
'--skip-npm',
447441
'-b',
448442
baseBlueprint.name,
449443
...baseBlueprint.options
@@ -498,9 +492,8 @@ describe(_getStartAndEndCommands, function() {
498492
commandName,
499493
'new',
500494
'my-project',
501-
'-sg',
502-
'-sn',
503-
'-sb',
495+
'--skip-git',
496+
'--skip-npm',
504497
'-b',
505498
baseBlueprint.name,
506499
...baseBlueprint.options
@@ -610,9 +603,8 @@ describe(_getStartAndEndCommands, function() {
610603
expect(args).to.deep.equal([
611604
'new',
612605
projectName,
613-
'-sg',
614-
'-sn',
615-
'-sb',
606+
'--skip-git',
607+
'--skip-npm',
616608
'-b',
617609
'app'
618610
]);
@@ -628,9 +620,8 @@ describe(_getStartAndEndCommands, function() {
628620
expect(args).to.deep.equal([
629621
'new',
630622
projectName,
631-
'-sg',
632-
'-sn',
633-
'-sb',
623+
'--skip-git',
624+
'--skip-npm',
634625
'-b',
635626
'addon',
636627
'--no-welcome'
@@ -649,9 +640,8 @@ describe(_getStartAndEndCommands, function() {
649640
'new',
650641
`@my-scope/${projectName}`,
651642
`-dir=${projectName}`,
652-
'-sg',
653-
'-sn',
654-
'-sb',
643+
'--skip-git',
644+
'--skip-npm',
655645
'-b',
656646
'app'
657647
]);
@@ -669,9 +659,8 @@ describe(_getStartAndEndCommands, function() {
669659
expect(args).to.deep.equal([
670660
'new',
671661
projectName,
672-
'-sg',
673-
'-sn',
674-
'-sb',
662+
'--skip-git',
663+
'--skip-npm',
675664
'-b',
676665
'/path/to/my-blueprint'
677666
]);
@@ -693,9 +682,8 @@ describe(_getStartAndEndCommands, function() {
693682
expect(args).to.deep.equal([
694683
'new',
695684
projectName,
696-
'-sg',
697-
'-sn',
698-
'-sb',
685+
'--skip-git',
686+
'--skip-npm',
699687
'-b',
700688
'app',
701689
'--my-option-1',

0 commit comments

Comments
 (0)