Skip to content

Commit

Permalink
Merge pull request #1240 from mansona/fix-remote-blueprints
Browse files Browse the repository at this point in the history
Fix custom blueprints
  • Loading branch information
mansona authored Aug 30, 2023
2 parents 257f5d7 + 05ebc8a commit 87c3902
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 41 deletions.
7 changes: 3 additions & 4 deletions src/get-start-and-end-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function getArgs({
args.push(`-dir=${directoryName}`);
}

args.push('-sg');
args.push('--skip-git');

let _blueprint;
if (blueprint.path) {
Expand All @@ -130,8 +130,7 @@ function getArgs({

return [
...args,
'-sn',
'-sb',
'--skip-npm',
'-b',
_blueprint,
...blueprint.options
Expand Down Expand Up @@ -175,7 +174,7 @@ function runEmberRemotely({
let isGlimmer = blueprint.packageName === glimmerPackageName && blueprint.name === glimmerPackageName;

if (isCustomBlueprint || isGlimmer) {
args = [`ember-cli@${lastNode8Version}`, ...args];
args = ['ember-cli@latest', ...args];
// args = ['-p', 'github:ember-cli/ember-cli#cfb9780', 'ember', 'new', projectName, `-dir=${directoryName}, '-sg', -sn', '-b', `${blueprint.packageName}@${blueprint.version}`];
} else {
args = ['-p', `ember-cli@${blueprint.version}`, 'ember', ...args];
Expand Down
62 changes: 25 additions & 37 deletions test/unit/get-start-and-end-commands-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,8 @@ describe(_getStartAndEndCommands, function() {
path.normalize(`${packageRoot}/bin/ember`),
'new',
projectName,
'-sg',
'-sn',
'-sb',
'--skip-git',
'--skip-npm',
'-b',
'app'
],
Expand Down Expand Up @@ -152,9 +151,8 @@ describe(_getStartAndEndCommands, function() {
commandName,
'new',
projectName,
'-sg',
'-sn',
'-sb',
'--skip-git',
'--skip-npm',
'-b',
'app'
],
Expand Down Expand Up @@ -296,9 +294,8 @@ describe(_getStartAndEndCommands, function() {
path.normalize(`${packageRoot}/bin/ember`),
'new',
projectName,
'-sg',
'-sn',
'-sb',
'--skip-git',
'--skip-npm',
'-b',
blueprintPath
],
Expand Down Expand Up @@ -335,12 +332,11 @@ describe(_getStartAndEndCommands, function() {

expect(npxStub.args).to.deep.equal([[
[
`${packageName}@3.16`,
`${packageName}@latest`,
'new',
projectName,
'-sg',
'-sn',
'-sb',
'--skip-git',
'--skip-npm',
'-b',
blueprintPath
],
Expand Down Expand Up @@ -385,9 +381,8 @@ describe(_getStartAndEndCommands, function() {
path.normalize(`${packageRoot}/bin/ember`),
'new',
projectName,
'-sg',
'-sn',
'-sb',
'--skip-git',
'--skip-npm',
'-b',
baseBlueprint.name,
...baseBlueprint.options
Expand Down Expand Up @@ -441,9 +436,8 @@ describe(_getStartAndEndCommands, function() {
commandName,
'new',
projectName,
'-sg',
'-sn',
'-sb',
'--skip-git',
'--skip-npm',
'-b',
baseBlueprint.name,
...baseBlueprint.options
Expand Down Expand Up @@ -498,9 +492,8 @@ describe(_getStartAndEndCommands, function() {
commandName,
'new',
'my-project',
'-sg',
'-sn',
'-sb',
'--skip-git',
'--skip-npm',
'-b',
baseBlueprint.name,
...baseBlueprint.options
Expand Down Expand Up @@ -610,9 +603,8 @@ describe(_getStartAndEndCommands, function() {
expect(args).to.deep.equal([
'new',
projectName,
'-sg',
'-sn',
'-sb',
'--skip-git',
'--skip-npm',
'-b',
'app'
]);
Expand All @@ -628,9 +620,8 @@ describe(_getStartAndEndCommands, function() {
expect(args).to.deep.equal([
'new',
projectName,
'-sg',
'-sn',
'-sb',
'--skip-git',
'--skip-npm',
'-b',
'addon',
'--no-welcome'
Expand All @@ -649,9 +640,8 @@ describe(_getStartAndEndCommands, function() {
'new',
`@my-scope/${projectName}`,
`-dir=${projectName}`,
'-sg',
'-sn',
'-sb',
'--skip-git',
'--skip-npm',
'-b',
'app'
]);
Expand All @@ -669,9 +659,8 @@ describe(_getStartAndEndCommands, function() {
expect(args).to.deep.equal([
'new',
projectName,
'-sg',
'-sn',
'-sb',
'--skip-git',
'--skip-npm',
'-b',
'/path/to/my-blueprint'
]);
Expand All @@ -693,9 +682,8 @@ describe(_getStartAndEndCommands, function() {
expect(args).to.deep.equal([
'new',
projectName,
'-sg',
'-sn',
'-sb',
'--skip-git',
'--skip-npm',
'-b',
'app',
'--my-option-1',
Expand Down

0 comments on commit 87c3902

Please sign in to comment.