Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix custom blueprints #1240

Merged
merged 4 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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