CLI is working, API not ready, Front broken

This commit is contained in:
Gaël Métais
2014-11-28 10:45:30 +01:00
parent b72e74e0d3
commit 1f83fe1b48
20 changed files with 1001 additions and 94 deletions
+34 -1
View File
@@ -1,2 +1,35 @@
'use strict';
#!/usr/bin/env node
//var color = require('colors');
var YellowLabTools = require('../lib/yellowlabtools');
// Check parameters
if (process.argv.length !== 3) {
console.error('Incorrect parameters');
console.error('\nUsage: ylt <pageUrl>\n');
process.exit(1);
}
var url = process.argv[2];
(function execute(url) {
'use strict';
var ylt = new YellowLabTools(url);
console.log('Test launched...');
ylt.
then(function(data) {
console.log('Success');
console.log(JSON.stringify(data.rules, null, 2));
}).fail(function(err) {
console.error('Test failed for %s', url);
console.error(err);
});
})(url);