Skip to content

Commit

Permalink
refactor(new): remove unused git repo logic (#4295)
Browse files Browse the repository at this point in the history
  • Loading branch information
clydin authored and hansl committed Jan 31, 2017
1 parent 439dcd7 commit 3e03c97
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 33 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"html-webpack-plugin": "^2.19.0",
"inflection": "^1.7.0",
"inquirer": "^0.12.0",
"is-git-url": "^0.2.0",
"isbinaryfile": "^2.0.3",
"json-loader": "^0.5.4",
"karma-sourcemap-loader": "^0.3.7",
Expand Down
13 changes: 0 additions & 13 deletions packages/angular-cli/ember-cli/lib/models/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
var nopt = require('nopt');
var chalk = require('chalk');
var path = require('path');
var isGitRepo = require('is-git-url');
var camelize = require('ember-cli-string-utils').camelize;
var getCallerFile = require('get-caller-file');
var printableProperties = require('../utilities/printable-properties').command;
Expand Down Expand Up @@ -31,18 +30,6 @@ var allowedWorkOptions = {
};

path.name = 'Path';
// extend nopt to recognize 'gitUrl' as a type
nopt.typeDefs.gitUrl = {
type: 'gitUrl',
validate: function(data, k, val) {
if (isGitRepo(val)) {
data[k] = val;
return true;
} else {
return false;
}
}
};

module.exports = Command;

Expand Down
23 changes: 5 additions & 18 deletions packages/angular-cli/ember-cli/lib/tasks/install-blueprint.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
var Blueprint = require('../models/blueprint');
var Task = require('../models/task');
var Promise = require('../ext/promise');
var isGitRepo = require('is-git-url');
var temp = require('temp');
var childProcess = require('child_process');
var path = require('path');
Expand Down Expand Up @@ -34,22 +33,10 @@ module.exports = Task.extend({

installOptions = merge(installOptions, options || {});

if (isGitRepo(blueprintOption)) {
return mkdir('ember-cli').then(function(pathName) {
var execArgs = ['git', 'clone', blueprintOption, pathName].join(' ');
return exec(execArgs).then(function() {
return exec('npm install', {cwd: pathName}).then(function() {
var blueprint = Blueprint.load(pathName);
return blueprint.install(installOptions);
});
});
});
} else {
var blueprintName = blueprintOption || 'app';
var blueprint = Blueprint.lookup(blueprintName, {
paths: this.project.blueprintLookupPaths()
});
return blueprint.install(installOptions);
}
var blueprintName = blueprintOption || 'app';
var blueprint = Blueprint.lookup(blueprintName, {
paths: this.project.blueprintLookupPaths()
});
return blueprint.install(installOptions);
}
});
1 change: 0 additions & 1 deletion packages/angular-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"html-webpack-plugin": "^2.19.0",
"inflection": "^1.7.0",
"inquirer": "^0.12.0",
"is-git-url": "^0.2.0",
"isbinaryfile": "^2.0.3",
"json-loader": "^0.5.4",
"karma-sourcemap-loader": "^0.3.7",
Expand Down

0 comments on commit 3e03c97

Please sign in to comment.