mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
mv test.sh to test folder
This commit is contained in:
parent
8addd9bdc6
commit
6afa63fb38
5 changed files with 14 additions and 34 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "cloudcmd",
|
||||
"version": "0.0.1",
|
||||
"scripts":{"test":"sh test.sh","start": "server.js"},
|
||||
"scripts":{"test":"sh test/test.sh","start": "server.js"},
|
||||
"engines": { "node": "0.6.x" },
|
||||
"subdomain": "cloudcmd"
|
||||
}
|
||||
3
test.sh
3
test.sh
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
npm install -g jshint
|
||||
jshint *.js --config .jshintrc
|
||||
10
test/.jshintrc
Normal file
10
test/.jshintrc
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"validthis": true,
|
||||
"laxcomma" : true,
|
||||
"laxbreak" : true,
|
||||
"browser" : true,
|
||||
"debug" : true,
|
||||
"boss" : true,
|
||||
"expr" : true,
|
||||
"asi" : true
|
||||
}
|
||||
26
test/test.js
26
test/test.js
|
|
@ -1,26 +0,0 @@
|
|||
var util = require('util'),
|
||||
exec = require('child_process').exec;
|
||||
|
||||
|
||||
|
||||
exec('curl http://phantomjs.googlecode.com/files/phantomjs-1.5.0-linux-x86-dynamic.tar.gz',makeExecFunctoin(_1));
|
||||
|
||||
var _1 = function(){exec('tar -zxf phantomjs-1.5.0-linux-x86-dynamic.tar.gz',makeExecFunctoin(_2));}
|
||||
var _2 = function(){exec('./phantomjs/bin/phantomjs',makeExecFunctoin(_3));};
|
||||
var _3 = function(){exec('ls',makeExecFunctoin());};
|
||||
var i;
|
||||
function makeExecFunctoin(pFunc){
|
||||
return function(error, stdout, stderr) {
|
||||
console.log('stdout: ' + stdout);
|
||||
console.log('stderr: ' + stderr);
|
||||
|
||||
if (error !== null) {
|
||||
console.log('exec error: ' + error);
|
||||
}
|
||||
else if(pFunc &&
|
||||
typeof pFunc==='function'){
|
||||
console.log(i++);
|
||||
pFunc();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
#!/bin/sh
|
||||
curl http://phantomjs.googlecode.com/files/phantomjs-1.5.0-linux-x86-dynamic.tar.gz
|
||||
tar -zxf phantomjs-1.5.0-linux-x86-dynamic.tar.gz
|
||||
./phantomjs/bin/phantomjs
|
||||
#!/bin/sh
|
||||
npm install -g jshint
|
||||
jshint *.js --config .jshintrc
|
||||
Loading…
Add table
Add a link
Reference in a new issue