Added 'repository' to package.json. Fixes #973 (#974)

* Added 'repository' to package.json. Fixes #973

* WIP #973 Updated tests
Esse commit está contido em:
Brian Broll
2017-01-29 14:22:10 -06:00
commit de GitHub
commit a172af208c
3 arquivos alterados com 10 adições e 3 exclusões
+3 -2
Ver Arquivo
@@ -8,7 +8,8 @@ var Command = require('commander').Command,
execSync = childProcess.execSync,
path = require('path'),
fs = require('fs'),
version = require('../package.json').version,
pkgJson = require('../package.json'),
version = pkgJson.version,
exists = require('exists-file'),
DEFAULT_CONFIG = require('./config.json'),
merge = require('lodash.merge'),
@@ -334,7 +335,7 @@ program
if (!args.torch || args.server) {
if (args.git) {
pkg = 'dfst/deepforge';
pkg = pkgJson.repository.url;
} else {
// Check the version
try {
+4
Ver Arquivo
@@ -1,5 +1,9 @@
{
"name": "deepforge",
"repository": {
"type": "git",
"url": "https://github.com/deepforge-dev/deepforge.git"
},
"bin": {
"deepforge": "./bin/deepforge"
},
+3 -1
Ver Arquivo
@@ -181,9 +181,11 @@ describe('cli', function() {
});
it('should update deepforge from git if --git set w/ npm', function() {
var repo = require('../../package.json').repository.url;
mocks.childProcess.spawn = (cmd, args) => {
// check for the git repo
if (cmd === 'npm') {
assert.notEqual(args.indexOf('dfst/deepforge'), -1);
assert.notEqual(args.indexOf(repo), -1);
}
};
cli('update --git');