browserify
This commit is contained in:
parent
3a5a5bee37
commit
3baaf7c00c
222
browser.js
222
browser.js
@ -155,115 +155,7 @@ function unescape(str) {
|
||||
return str;
|
||||
}
|
||||
|
||||
},{"glob-base":2,"is-dotfile":5,"is-extglob":6,"is-glob":7}],2:[function(require,module,exports){
|
||||
/*!
|
||||
* glob-base <https://github.com/jonschlinkert/glob-base>
|
||||
*
|
||||
* Copyright (c) 2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
var parent = require('glob-parent');
|
||||
|
||||
module.exports = function globBase(pattern) {
|
||||
if (typeof pattern !== 'string') {
|
||||
throw new TypeError('glob-base expects a string.');
|
||||
}
|
||||
|
||||
var res = {};
|
||||
res.base = parent(pattern);
|
||||
res.isGlob = res.base !== pattern;
|
||||
|
||||
if (res.base !== '.') {
|
||||
res.glob = pattern.substr(res.base.length);
|
||||
if (res.glob.charAt(0) === '/') {
|
||||
res.glob = res.glob.substr(1);
|
||||
}
|
||||
} else {
|
||||
res.glob = pattern;
|
||||
}
|
||||
|
||||
if (!res.isGlob) {
|
||||
res.base = dirname(pattern);
|
||||
res.glob = res.base !== '.'
|
||||
? pattern.substr(res.base.length)
|
||||
: pattern;
|
||||
}
|
||||
|
||||
if (res.glob.substr(0, 2) === './') {
|
||||
res.glob = res.glob.substr(2);
|
||||
}
|
||||
if (res.glob.charAt(0) === '/') {
|
||||
res.glob = res.glob.substr(1);
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
||||
function dirname(glob) {
|
||||
if (glob.slice(-1) === '/') return glob;
|
||||
return path.dirname(glob);
|
||||
}
|
||||
|
||||
},{"glob-parent":3,"path":8}],3:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
var isglob = require('is-glob');
|
||||
|
||||
module.exports = function globParent(str) {
|
||||
while (isglob(str)) str = path.dirname(str);
|
||||
return str;
|
||||
};
|
||||
|
||||
},{"is-glob":4,"path":8}],4:[function(require,module,exports){
|
||||
/*!
|
||||
* is-glob <https://github.com/jonschlinkert/is-glob>
|
||||
*
|
||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
module.exports = function isGlob(str) {
|
||||
return typeof str === 'string'
|
||||
&& /[!*{}?(|)[\]]/.test(str);
|
||||
};
|
||||
|
||||
},{}],5:[function(require,module,exports){
|
||||
/*!
|
||||
* is-dotfile <https://github.com/regexps/is-dotfile>
|
||||
*
|
||||
* Copyright (c) 2015 Jon Schlinkert, contributors.
|
||||
* Licensed under the MIT license.
|
||||
*/
|
||||
|
||||
module.exports = function(str) {
|
||||
if (str.charCodeAt(0) === 46 /* . */ && str.indexOf('/', 1) === -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var last = str.lastIndexOf('/');
|
||||
return last !== -1 ? str.charCodeAt(last + 1) === 46 /* . */ : false;
|
||||
};
|
||||
|
||||
},{}],6:[function(require,module,exports){
|
||||
/*!
|
||||
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
||||
*
|
||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
module.exports = function isExtglob(str) {
|
||||
return typeof str === 'string'
|
||||
&& /[@?!+*]\(/.test(str);
|
||||
};
|
||||
|
||||
},{}],7:[function(require,module,exports){
|
||||
arguments[4][4][0].apply(exports,arguments)
|
||||
},{"dup":4}],8:[function(require,module,exports){
|
||||
},{"glob-base":4,"is-dotfile":7,"is-extglob":8,"is-glob":9}],2:[function(require,module,exports){
|
||||
(function (process){
|
||||
// Copyright Joyent, Inc. and other Node contributors.
|
||||
//
|
||||
@ -491,7 +383,7 @@ var substr = 'ab'.substr(-1) === 'b'
|
||||
;
|
||||
|
||||
}).call(this,require('_process'))
|
||||
},{"_process":9}],9:[function(require,module,exports){
|
||||
},{"_process":3}],3:[function(require,module,exports){
|
||||
// shim for using process in browser
|
||||
|
||||
var process = module.exports = {};
|
||||
@ -551,4 +443,112 @@ process.chdir = function (dir) {
|
||||
};
|
||||
process.umask = function() { return 0; };
|
||||
|
||||
},{}]},{},[1]);
|
||||
},{}],4:[function(require,module,exports){
|
||||
/*!
|
||||
* glob-base <https://github.com/jonschlinkert/glob-base>
|
||||
*
|
||||
* Copyright (c) 2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
var parent = require('glob-parent');
|
||||
|
||||
module.exports = function globBase(pattern) {
|
||||
if (typeof pattern !== 'string') {
|
||||
throw new TypeError('glob-base expects a string.');
|
||||
}
|
||||
|
||||
var res = {};
|
||||
res.base = parent(pattern);
|
||||
res.isGlob = res.base !== pattern;
|
||||
|
||||
if (res.base !== '.') {
|
||||
res.glob = pattern.substr(res.base.length);
|
||||
if (res.glob.charAt(0) === '/') {
|
||||
res.glob = res.glob.substr(1);
|
||||
}
|
||||
} else {
|
||||
res.glob = pattern;
|
||||
}
|
||||
|
||||
if (!res.isGlob) {
|
||||
res.base = dirname(pattern);
|
||||
res.glob = res.base !== '.'
|
||||
? pattern.substr(res.base.length)
|
||||
: pattern;
|
||||
}
|
||||
|
||||
if (res.glob.substr(0, 2) === './') {
|
||||
res.glob = res.glob.substr(2);
|
||||
}
|
||||
if (res.glob.charAt(0) === '/') {
|
||||
res.glob = res.glob.substr(1);
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
||||
function dirname(glob) {
|
||||
if (glob.slice(-1) === '/') return glob;
|
||||
return path.dirname(glob);
|
||||
}
|
||||
|
||||
},{"glob-parent":5,"path":2}],5:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
var isglob = require('is-glob');
|
||||
|
||||
module.exports = function globParent(str) {
|
||||
while (isglob(str)) str = path.dirname(str);
|
||||
return str;
|
||||
};
|
||||
|
||||
},{"is-glob":6,"path":2}],6:[function(require,module,exports){
|
||||
/*!
|
||||
* is-glob <https://github.com/jonschlinkert/is-glob>
|
||||
*
|
||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
module.exports = function isGlob(str) {
|
||||
return typeof str === 'string'
|
||||
&& /[!*{}?(|)[\]]/.test(str);
|
||||
};
|
||||
|
||||
},{}],7:[function(require,module,exports){
|
||||
/*!
|
||||
* is-dotfile <https://github.com/regexps/is-dotfile>
|
||||
*
|
||||
* Copyright (c) 2015 Jon Schlinkert, contributors.
|
||||
* Licensed under the MIT license.
|
||||
*/
|
||||
|
||||
module.exports = function(str) {
|
||||
if (str.charCodeAt(0) === 46 /* . */ && str.indexOf('/', 1) === -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var last = str.lastIndexOf('/');
|
||||
return last !== -1 ? str.charCodeAt(last + 1) === 46 /* . */ : false;
|
||||
};
|
||||
|
||||
},{}],8:[function(require,module,exports){
|
||||
/*!
|
||||
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
||||
*
|
||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
module.exports = function isExtglob(str) {
|
||||
return typeof str === 'string'
|
||||
&& /[@?!+*]\(/.test(str);
|
||||
};
|
||||
|
||||
},{}],9:[function(require,module,exports){
|
||||
arguments[4][6][0].apply(exports,arguments)
|
||||
},{"dup":6}]},{},[1]);
|
||||
|
||||
Reference in New Issue
Block a user