mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(package) rm checkup
This commit is contained in:
parent
6bf04403ae
commit
d20291a17f
2 changed files with 8 additions and 7 deletions
|
|
@ -3,15 +3,13 @@ var Util;
|
|||
(function(scope, Util) {
|
||||
'use strict';
|
||||
|
||||
var check, rendy;
|
||||
var rendy;
|
||||
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
check = require('checkup');
|
||||
rendy = require('rendy');
|
||||
|
||||
module.exports = new CloudFuncProto(Util);
|
||||
} else {
|
||||
check = Util.check;
|
||||
rendy = Util.render;
|
||||
scope.CloudFunc = new CloudFuncProto(Util);
|
||||
}
|
||||
|
|
@ -91,8 +89,8 @@ var Util;
|
|||
this.rmLastSlash = function(path) {
|
||||
var length, lastSlash, isEqual;
|
||||
|
||||
check(arguments, ['path'])
|
||||
.type('path', path, 'string');
|
||||
if (typeof path !== 'string')
|
||||
throw(Error('path should be a string!'));
|
||||
|
||||
length = path.length - 1;
|
||||
lastSlash = path.lastIndexOf('/');
|
||||
|
|
@ -124,7 +122,11 @@ var Util;
|
|||
pathHTML = '',
|
||||
path = '/';
|
||||
|
||||
check(arguments, ['url', 'template']);
|
||||
if (!url)
|
||||
throw(Error('url could not be empty!'));
|
||||
|
||||
if (!template)
|
||||
throw(Error('template could not be empty!'));
|
||||
|
||||
namesRaw = url.split('/')
|
||||
.slice(1, -1),
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
"subdomain": "cloudcmd",
|
||||
"dependencies": {
|
||||
"ashify": "~1.0.0",
|
||||
"checkup": "~1.0.2",
|
||||
"console-io": "~2.1.0",
|
||||
"edward": "~1.1.0",
|
||||
"execon": "~1.1.0",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue