first commit

This commit is contained in:
armansansd
2023-07-12 16:31:19 +01:00
commit 3424b1927b
23306 changed files with 2217776 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
{
"loopfunc": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"unused": true,
"boss": true,
"eqnull": true,
"node": true
}
+2
View File
@@ -0,0 +1,2 @@
test
Gruntfile.js
+10
View File
@@ -0,0 +1,10 @@
sudo: false
language: node_js
node_js:
- "0.10"
- "0.12"
- "4"
- "6"
- "8"
before_install:
- npm install -g grunt-cli
+22
View File
@@ -0,0 +1,22 @@
Copyright (c) 2013 Tyler Kellen
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
+59
View File
@@ -0,0 +1,59 @@
# matchdep [![Build Status](https://secure.travis-ci.org/tkellen/js-matchdep.svg?branch=master)](http://travis-ci.org/tkellen/js-matchdep)
> Use [micromatch] to filter npm module dependencies by name.
[![NPM](https://nodei.co/npm/matchdep.png)](https://nodei.co/npm/matchdep/)
## Examples
```js
var matchdep = require('matchdep');
// Filter dependencies (by autoloading nearest package.json)
matchdep.filter('mini*');
// Filter devDependencies (with config string indicating file to be required)
matchdep.filterDev('grunt-contrib-*', './package.json');
// Filter peerDependencies (with config string indicating file to be required)
matchdep.filterPeer('foo-{bar,baz}', './some-other.json');
// Filter all dependencies (with explicit config provided)
matchdep.filterAll('*', require('./yet-another.json'));
// Filter all dependencies, exclude grunt (multiple matching patterns)
matchdep.filterAll(['*','!grunt']);
```
## Usage
```js
filter(pattern, config)
filterDev(pattern, config)
filterPeer(pattern, config)
filterAll(pattern, config)
```
### pattern
Type: `String|Array`
Default: 'none'
A [micromatch] compatible match pattern to filter dependencies.
### config
Type: `String` or `Object`
Default: Path to nearest package.json.
If config is a string, matchdep will attempt to require it. If it is an object, it will be used directly.
## Release History
* 2017-08-18 - v2.0.0 - Upgrade major versions of dependencies, Upgrade devDeps
* 2016-02-09 - v1.0.1 - switch to [micromatch], remove [globule]
* 2015-09-27 - v1.0.0 - throw when no package.json found, update dependencies, remove node 0.8 support
* 2013-10-09 - v0.3.0 - support multiple pattern matches using [globule]
* 2013-10-08 - v0.2.0 - refactor and support filtering peerDependencies
* 2012-11-27 - v0.1.0 - initial release
[globule]: https://github.com/cowboy/node-globule
[micromatch]: https://github.com/jonschlinkert/micromatch
+76
View File
@@ -0,0 +1,76 @@
/*
* matchdep
* https://github.com/tkellen/node-matchdep
*
* Copyright (c) 2012 Tyler Kellen
* Licensed under the MIT license.
*/
'use strict';
var micromatch = require('micromatch');
var findup = require('findup-sync');
var resolve = require('resolve').sync;
var stackTrace = require('stack-trace');
var path = require('path');
// export object
var matchdep = module.exports = {};
// Ensure configuration has the correct properties.
function loadConfig(config, props) {
// The calling module's path. Unfortunately, because modules are cached,
// module.parent is the FIRST calling module parent, not necessarily the
// current one.
var callerPath = path.dirname(stackTrace.get(loadConfig)[1].getFileName());
// If no config defined, resolve to nearest package.json to the calling lib. If not found, throw an error.
if (config == null) {
config = findup('package.json', {cwd: callerPath});
if (config == null) {
throw new Error('No package.json found.');
}
}
// If filename was specified with no path parts, make the path absolute so
// that resolve doesn't look in node_module directories for it.
else if (typeof config === 'string' && !/[\\\/]/.test(config)) {
config = path.join(callerPath, config);
}
// If package is a string, try to require it.
if (typeof config === 'string') {
config = require(resolve(config, {basedir: callerPath}));
}
// If config is not an object yet, something is amiss.
if (typeof config !== 'object') {
throw new Error('Invalid configuration specified.');
}
// For all specified props, populate result object.
var result = {};
props.forEach(function(prop) {
result[prop] = config[prop] ? Object.keys(config[prop]) : [];
});
return result;
}
// What config properties should each method search?
var methods = {
filter: ['dependencies'],
filterDev: ['devDependencies'],
filterPeer: ['peerDependencies'],
filterAll: ['dependencies', 'devDependencies', 'peerDependencies'],
};
// Dynamically generate methods.
Object.keys(methods).forEach(function(method) {
var props = methods[method];
matchdep[method] = function(pattern, config) {
config = loadConfig(config, props);
var search = props.reduce(function(result, prop) {
return result.concat(config[prop]);
}, []);
return micromatch(search, pattern);
};
});
+67
View File
@@ -0,0 +1,67 @@
{
"_from": "matchdep@^2.0.0",
"_id": "matchdep@2.0.0",
"_inBundle": false,
"_integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=",
"_location": "/matchdep",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "matchdep@^2.0.0",
"name": "matchdep",
"escapedName": "matchdep",
"rawSpec": "^2.0.0",
"saveSpec": null,
"fetchSpec": "^2.0.0"
},
"_requiredBy": [
"/gulp/gulp-cli"
],
"_resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz",
"_shasum": "c6f34834a0d8dbc3b37c27ee8bbcb27c7775582e",
"_spec": "matchdep@^2.0.0",
"_where": "/srv/http/mmap_sarrebourg/user/themes/basic/node_modules/gulp/node_modules/gulp-cli",
"author": {
"name": "Tyler Kellen",
"url": "http://goingslowly.com/"
},
"bugs": {
"url": "https://github.com/tkellen/js-matchdep/issues"
},
"bundleDependencies": false,
"dependencies": {
"findup-sync": "^2.0.0",
"micromatch": "^3.0.4",
"resolve": "^1.4.0",
"stack-trace": "0.0.10"
},
"deprecated": false,
"description": "Use micromatch to filter npm module dependencies by name.",
"devDependencies": {
"grunt": "^1.0.1",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-nodeunit": "^1.0.0"
},
"engines": {
"node": ">= 0.10.0"
},
"homepage": "https://github.com/tkellen/js-matchdep",
"keywords": [
"package.json",
"dependencies",
"devDependencies",
"peerDependencies"
],
"license": "MIT",
"main": "lib/matchdep",
"name": "matchdep",
"repository": {
"type": "git",
"url": "git://github.com/tkellen/js-matchdep.git"
},
"scripts": {
"test": "grunt"
},
"version": "2.0.0"
}