0.3.0 • Published 11 years ago
checkonline v0.3.0
checkonline
Check if spm package is online.
Install
$ npm install checkonlineUsage
var checkonline = require('checkonline');
checkonline({
cwd: process.cwd(),
server: 'https://a.alipayobjects.com'
}, function(err, files) {
console.log('online: %s', files
.filter(function(f){return f.isOnline})
.map(function(f){return f.filepath;})
);
});Options
cwd, path to packagewithDeps, also check dependencies of this packagestatusCode, the response should return this status codeserver, cdn server to serve assets
File Object
filepathisOnline
LISENCE
Copyright (c) 2014 chencheng. Licensed under the MIT license.