Skip to content

Commit 9c428dc

Browse files
clydinMRHarrison
authored andcommitted
refactor(new): remove unused git repo logic (angular#4295)
1 parent ae62b95 commit 9c428dc

File tree

4 files changed

+5
-33
lines changed

4 files changed

+5
-33
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"html-webpack-plugin": "^2.19.0",
6666
"inflection": "^1.7.0",
6767
"inquirer": "^0.12.0",
68-
"is-git-url": "^0.2.0",
6968
"isbinaryfile": "^2.0.3",
7069
"json-loader": "^0.5.4",
7170
"karma-sourcemap-loader": "^0.3.7",

packages/angular-cli/ember-cli/lib/models/command.js

-13
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
var nopt = require('nopt');
44
var chalk = require('chalk');
55
var path = require('path');
6-
var isGitRepo = require('is-git-url');
76
var camelize = require('ember-cli-string-utils').camelize;
87
var getCallerFile = require('get-caller-file');
98
var printableProperties = require('../utilities/printable-properties').command;
@@ -31,18 +30,6 @@ var allowedWorkOptions = {
3130
};
3231

3332
path.name = 'Path';
34-
// extend nopt to recognize 'gitUrl' as a type
35-
nopt.typeDefs.gitUrl = {
36-
type: 'gitUrl',
37-
validate: function(data, k, val) {
38-
if (isGitRepo(val)) {
39-
data[k] = val;
40-
return true;
41-
} else {
42-
return false;
43-
}
44-
}
45-
};
4633

4734
module.exports = Command;
4835

packages/angular-cli/ember-cli/lib/tasks/install-blueprint.js

+5-18
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
var Blueprint = require('../models/blueprint');
44
var Task = require('../models/task');
55
var Promise = require('../ext/promise');
6-
var isGitRepo = require('is-git-url');
76
var temp = require('temp');
87
var childProcess = require('child_process');
98
var path = require('path');
@@ -34,22 +33,10 @@ module.exports = Task.extend({
3433

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

37-
if (isGitRepo(blueprintOption)) {
38-
return mkdir('ember-cli').then(function(pathName) {
39-
var execArgs = ['git', 'clone', blueprintOption, pathName].join(' ');
40-
return exec(execArgs).then(function() {
41-
return exec('npm install', {cwd: pathName}).then(function() {
42-
var blueprint = Blueprint.load(pathName);
43-
return blueprint.install(installOptions);
44-
});
45-
});
46-
});
47-
} else {
48-
var blueprintName = blueprintOption || 'app';
49-
var blueprint = Blueprint.lookup(blueprintName, {
50-
paths: this.project.blueprintLookupPaths()
51-
});
52-
return blueprint.install(installOptions);
53-
}
36+
var blueprintName = blueprintOption || 'app';
37+
var blueprint = Blueprint.lookup(blueprintName, {
38+
paths: this.project.blueprintLookupPaths()
39+
});
40+
return blueprint.install(installOptions);
5441
}
5542
});

packages/angular-cli/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
"html-webpack-plugin": "^2.19.0",
5555
"inflection": "^1.7.0",
5656
"inquirer": "^0.12.0",
57-
"is-git-url": "^0.2.0",
5857
"isbinaryfile": "^2.0.3",
5958
"json-loader": "^0.5.4",
6059
"karma-sourcemap-loader": "^0.3.7",

0 commit comments

Comments
 (0)