Comparing version 2.1.0 to 2.1.1
@@ -11,2 +11,3 @@ #!/usr/bin/env node | ||
var cp = require('child_process') | ||
var extend = require('extend.js') | ||
var mkdirp = require('mkdirp') | ||
@@ -16,2 +17,3 @@ var path = require('path') | ||
var series = require('run-series') | ||
var parallel = require('run-parallel') | ||
@@ -21,29 +23,43 @@ var TMP = path.join(__dirname, '..', 'tmp') | ||
var URLS = [ | ||
var urls = [ | ||
'https://github.com/feross/webtorrent.git', | ||
'https://github.com/feross/bittorrent-tracker.git', | ||
'https://github.com/feross/bittorrent-dht.git' | ||
'https://github.com/feross/bittorrent-dht.git', | ||
'https://github.com/feross/buffer.git' | ||
// 'https://github.com/mafintosh/level-temp.git' | ||
] | ||
var modules = {} | ||
urls.forEach(function (url) { | ||
var name = /\/([^.\/]+)\.git$/.exec(url)[1] | ||
modules[name] = url | ||
}) | ||
rimraf.sync(TMP) | ||
mkdirp.sync(TMP) | ||
series(URLS.map(function (url) { | ||
series(Object.keys(modules).map(function (name) { | ||
var url = modules[name] | ||
return function (cb) { | ||
var name = /\/([^.\/]+)\.git$/.exec(url)[1] | ||
var args = [ 'clone', url, path.join(TMP, name) ] | ||
// TODO: Start `git` in a way that works on Windows – PR welcome! | ||
spawn('git', args, cb) | ||
spawn('git', args, {}, cb) | ||
} | ||
}), function (err) { | ||
}), runTests) | ||
function runTests (err) { | ||
if (err) return error(err) | ||
spawn(STANDARD, ['--verbose'], function (err) { | ||
parallel(Object.keys(modules).map(function (name) { | ||
return function (cb) { | ||
var cwd = path.join(TMP, name) | ||
spawn(STANDARD, ['--verbose'], { cwd: cwd }, cb) | ||
} | ||
}), function (err) { | ||
if (err) return error(err) | ||
console.log('ok') | ||
}) | ||
}) | ||
} | ||
function spawn (command, args, cb) { | ||
var child = cp.spawn(command, args, { stdio: 'inherit' }) | ||
function spawn (command, args, opts, cb) { | ||
var child = cp.spawn(command, args, extend({ stdio: 'inherit' }, opts)) | ||
child.on('error', error) | ||
@@ -50,0 +66,0 @@ child.on('close', function (code) { |
{ | ||
"name": "standard", | ||
"description": "JavaScript Standard Style", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"author": { | ||
@@ -26,4 +26,6 @@ "name": "Feross Aboukhadijeh", | ||
"devDependencies": { | ||
"extend.js": "0.0.2", | ||
"mkdirp": "^0.5.0", | ||
"rimraf": "^2.2.8", | ||
"run-parallel": "^1.0.0", | ||
"run-series": "^1.0.2" | ||
@@ -56,4 +58,7 @@ }, | ||
"scripts": { | ||
"test": "node ./bin/test.js" | ||
"test": "standard && node ./bin/test.js" | ||
}, | ||
"standard": { | ||
"ignore": "tmp/**" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23551
277
5