1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-03 12:50:04 +02:00

add node modules to repo

This commit is contained in:
s2
2018-06-03 13:47:11 +02:00
parent e8c95255e8
commit d002126b72
4115 changed files with 440218 additions and 7519 deletions

49
node_modules/strip-indent/cli.js generated vendored Executable file
View File

@@ -0,0 +1,49 @@
#!/usr/bin/env node
'use strict';
var fs = require('fs');
var stdin = require('get-stdin');
var pkg = require('./package.json');
var stripIndent = require('./');
var argv = process.argv.slice(2);
var input = argv[0];
function help() {
console.log([
'',
' ' + pkg.description,
'',
' Usage',
' strip-indent <file>',
' echo <string> | strip-indent',
'',
' Example',
' echo \'\\tunicorn\\n\\t\\tcake\' | strip-indent',
' unicorn',
' \tcake'
].join('\n'));
}
function init(data) {
console.log(stripIndent(data));
}
if (argv.indexOf('--help') !== -1) {
help();
return;
}
if (argv.indexOf('--version') !== -1) {
console.log(pkg.version);
return;
}
if (process.stdin.isTTY) {
if (!input) {
help();
return;
}
init(fs.readFileSync(input, 'utf8'));
} else {
stdin(init);
}

16
node_modules/strip-indent/index.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
'use strict';
module.exports = function (str) {
var match = str.match(/^[ \t]*(?=\S)/gm);
if (!match) {
return str;
}
var indent = Math.min.apply(Math, match.map(function (el) {
return el.length;
}));
var re = new RegExp('^[ \\t]{' + indent + '}', 'gm');
return indent > 0 ? str.replace(re, '') : str;
};

21
node_modules/strip-indent/license generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
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.

82
node_modules/strip-indent/package.json generated vendored Normal file
View File

@@ -0,0 +1,82 @@
{
"_args": [
[
"strip-indent@1.0.1",
"/home/s2/Documents/Code/gitlit"
]
],
"_development": true,
"_from": "strip-indent@1.0.1",
"_id": "strip-indent@1.0.1",
"_inBundle": false,
"_integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
"_location": "/strip-indent",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "strip-indent@1.0.1",
"name": "strip-indent",
"escapedName": "strip-indent",
"rawSpec": "1.0.1",
"saveSpec": null,
"fetchSpec": "1.0.1"
},
"_requiredBy": [
"/redent"
],
"_resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
"_spec": "1.0.1",
"_where": "/home/s2/Documents/Code/gitlit",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"bin": {
"strip-indent": "cli.js"
},
"bugs": {
"url": "https://github.com/sindresorhus/strip-indent/issues"
},
"dependencies": {
"get-stdin": "^4.0.1"
},
"description": "Strip leading whitespace from every line in a string",
"devDependencies": {
"mocha": "*"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js",
"cli.js"
],
"homepage": "https://github.com/sindresorhus/strip-indent#readme",
"keywords": [
"cli",
"bin",
"browser",
"strip",
"normalize",
"remove",
"indent",
"indentation",
"whitespace",
"space",
"tab",
"string",
"str"
],
"license": "MIT",
"name": "strip-indent",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/strip-indent.git"
},
"scripts": {
"test": "mocha"
},
"version": "1.0.1"
}

61
node_modules/strip-indent/readme.md generated vendored Normal file
View File

@@ -0,0 +1,61 @@
# strip-indent [![Build Status](https://travis-ci.org/sindresorhus/strip-indent.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-indent)
> Strip leading whitespace from every line in a string
The line with the least number of leading whitespace, ignoring empty lines, determines the number to remove.
Useful for removing redundant indentation.
## Install
```sh
$ npm install --save strip-indent
```
## Usage
```js
var str = '\tunicorn\n\t\tcake';
/*
unicorn
cake
*/
stripIndent('\tunicorn\n\t\tcake');
/*
unicorn
cake
*/
```
## CLI
```sh
$ npm install --global strip-indent
```
```sh
$ strip-indent --help
Usage
strip-indent <file>
echo <string> | strip-indent
Example
echo '\tunicorn\n\t\tcake' | strip-indent
unicorn
cake
```
## Related
- [indent-string](https://github.com/sindresorhus/indent-string) - Indent each line in a string
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)