mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-12-18 01:39:04 +00:00
update
This commit is contained in:
21
node_modules/pretty/LICENSE
generated
vendored
Normal file
21
node_modules/pretty/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2015, 2017, Jon Schlinkert
|
||||
|
||||
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.
|
||||
105
node_modules/pretty/README.md
generated
vendored
Normal file
105
node_modules/pretty/README.md
generated
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
# pretty [](https://www.npmjs.com/package/pretty) [](https://npmjs.org/package/pretty) [](https://travis-ci.org/jonschlinkert/pretty)
|
||||
|
||||
> Some tweaks for beautifying HTML with js-beautify according to my preferences.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save pretty
|
||||
```
|
||||
|
||||
Install with [yarn](https://yarnpkg.com):
|
||||
|
||||
```sh
|
||||
$ yarn add pretty
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var pretty = require('pretty');
|
||||
|
||||
pretty(STRING_OF_HTML);
|
||||
```
|
||||
|
||||
Before
|
||||
|
||||
```html
|
||||
<!DOCTYPE html> <html lang="en"> <head>
|
||||
<meta charset="UTF-8"> <title>Home</title>
|
||||
</head> <body> This is content. </body> </html>
|
||||
```
|
||||
|
||||
After
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Home</title>
|
||||
</head>
|
||||
<body>
|
||||
This is content.
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### ocd
|
||||
|
||||
```js
|
||||
pretty(STRING_OF_HTML, {ocd: true});
|
||||
```
|
||||
|
||||
**Type**: `Boolean`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
* condenses multiple newlines to a single newline
|
||||
* trims leading and trailing whitespace
|
||||
* ensures that a trailing newline is inserted
|
||||
* normalizes whitespace before code comments
|
||||
|
||||
## About
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 13, 2017._
|
||||
45
node_modules/pretty/index.js
generated
vendored
Normal file
45
node_modules/pretty/index.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
/*!
|
||||
* pretty <https://github.com/jonschlinkert/pretty>
|
||||
*
|
||||
* Copyright (c) 2013-2015, 2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var beautify = require('js-beautify');
|
||||
var condense = require('condense-newlines');
|
||||
var extend = require('extend-shallow');
|
||||
var defaults = {
|
||||
unformatted: ['code', 'pre', 'em', 'strong', 'span'],
|
||||
indent_inner_html: true,
|
||||
indent_char: ' ',
|
||||
indent_size: 2,
|
||||
sep: '\n'
|
||||
};
|
||||
|
||||
module.exports = function pretty(str, options) {
|
||||
var opts = extend({}, defaults, options);
|
||||
str = beautify.html(str, opts);
|
||||
|
||||
if (opts.ocd === true) {
|
||||
if (opts.newlines) opts.sep = opts.newlines;
|
||||
return ocd(str, opts);
|
||||
}
|
||||
|
||||
return str;
|
||||
};
|
||||
|
||||
function ocd(str, options) {
|
||||
// Normalize and condense all newlines
|
||||
return condense(str, options)
|
||||
// Remove empty whitespace the top of a file.
|
||||
.replace(/^\s+/g, '')
|
||||
// Remove extra whitespace from eof
|
||||
.replace(/\s+$/g, '\n')
|
||||
|
||||
// Add a space above each comment
|
||||
.replace(/(\s*<!--)/g, '\n$1')
|
||||
// Bring closing comments up to the same line as closing tag.
|
||||
.replace(/>(\s*)(?=<!--\s*\/)/g, '> ');
|
||||
}
|
||||
21
node_modules/pretty/node_modules/extend-shallow/LICENSE
generated
vendored
Normal file
21
node_modules/pretty/node_modules/extend-shallow/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
|
||||
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.
|
||||
61
node_modules/pretty/node_modules/extend-shallow/README.md
generated
vendored
Normal file
61
node_modules/pretty/node_modules/extend-shallow/README.md
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
# extend-shallow [](http://badge.fury.io/js/extend-shallow) [](https://travis-ci.org/jonschlinkert/extend-shallow)
|
||||
|
||||
> Extend an object with the properties of additional objects. node.js/javascript util.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/)
|
||||
|
||||
```sh
|
||||
$ npm i extend-shallow --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var extend = require('extend-shallow');
|
||||
|
||||
extend({a: 'b'}, {c: 'd'})
|
||||
//=> {a: 'b', c: 'd'}
|
||||
```
|
||||
|
||||
Pass an empty object to shallow clone:
|
||||
|
||||
```js
|
||||
var obj = {};
|
||||
extend(obj, {a: 'b'}, {c: 'd'})
|
||||
//=> {a: 'b', c: 'd'}
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util.
|
||||
* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own)
|
||||
* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in)
|
||||
* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor.
|
||||
* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null.
|
||||
* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value.
|
||||
|
||||
## Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm i -d && npm test
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
+ [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2015 Jon Schlinkert
|
||||
Released under the MIT license.
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 29, 2015._
|
||||
33
node_modules/pretty/node_modules/extend-shallow/index.js
generated
vendored
Normal file
33
node_modules/pretty/node_modules/extend-shallow/index.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
'use strict';
|
||||
|
||||
var isObject = require('is-extendable');
|
||||
|
||||
module.exports = function extend(o/*, objects*/) {
|
||||
if (!isObject(o)) { o = {}; }
|
||||
|
||||
var len = arguments.length;
|
||||
for (var i = 1; i < len; i++) {
|
||||
var obj = arguments[i];
|
||||
|
||||
if (isObject(obj)) {
|
||||
assign(o, obj);
|
||||
}
|
||||
}
|
||||
return o;
|
||||
};
|
||||
|
||||
function assign(a, b) {
|
||||
for (var key in b) {
|
||||
if (hasOwn(b, key)) {
|
||||
a[key] = b[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given `key` is an own property of `obj`.
|
||||
*/
|
||||
|
||||
function hasOwn(obj, key) {
|
||||
return Object.prototype.hasOwnProperty.call(obj, key);
|
||||
}
|
||||
90
node_modules/pretty/node_modules/extend-shallow/package.json
generated
vendored
Normal file
90
node_modules/pretty/node_modules/extend-shallow/package.json
generated
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"extend-shallow@2.0.1",
|
||||
"/Users/tatiana/selfdefined"
|
||||
]
|
||||
],
|
||||
"_from": "extend-shallow@2.0.1",
|
||||
"_id": "extend-shallow@2.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
|
||||
"_location": "/pretty/extend-shallow",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "extend-shallow@2.0.1",
|
||||
"name": "extend-shallow",
|
||||
"escapedName": "extend-shallow",
|
||||
"rawSpec": "2.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/pretty"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
|
||||
"_spec": "2.0.1",
|
||||
"_where": "/Users/tatiana/selfdefined",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/extend-shallow/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-extendable": "^0.1.0"
|
||||
},
|
||||
"description": "Extend an object with the properties of additional objects. node.js/javascript util.",
|
||||
"devDependencies": {
|
||||
"array-slice": "^0.2.3",
|
||||
"benchmarked": "^0.1.4",
|
||||
"chalk": "^1.0.0",
|
||||
"for-own": "^0.1.3",
|
||||
"glob": "^5.0.12",
|
||||
"is-plain-object": "^2.0.1",
|
||||
"kind-of": "^2.0.0",
|
||||
"minimist": "^1.1.1",
|
||||
"mocha": "^2.2.5",
|
||||
"should": "^7.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/jonschlinkert/extend-shallow",
|
||||
"keywords": [
|
||||
"assign",
|
||||
"extend",
|
||||
"javascript",
|
||||
"js",
|
||||
"keys",
|
||||
"merge",
|
||||
"obj",
|
||||
"object",
|
||||
"prop",
|
||||
"properties",
|
||||
"property",
|
||||
"props",
|
||||
"shallow",
|
||||
"util",
|
||||
"utility",
|
||||
"utils",
|
||||
"value"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "extend-shallow",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/extend-shallow.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "2.0.1"
|
||||
}
|
||||
90
node_modules/pretty/package.json
generated
vendored
Normal file
90
node_modules/pretty/package.json
generated
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"pretty@2.0.0",
|
||||
"/Users/tatiana/selfdefined"
|
||||
]
|
||||
],
|
||||
"_from": "pretty@2.0.0",
|
||||
"_id": "pretty@2.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-rbx5YLe7/iiaVX3F9zdhmiINBqU=",
|
||||
"_location": "/pretty",
|
||||
"_phantomChildren": {
|
||||
"is-extendable": "0.1.1"
|
||||
},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "pretty@2.0.0",
|
||||
"name": "pretty",
|
||||
"escapedName": "pretty",
|
||||
"rawSpec": "2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@11ty/eleventy"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/pretty/-/pretty-2.0.0.tgz",
|
||||
"_spec": "2.0.0",
|
||||
"_where": "/Users/tatiana/selfdefined",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/pretty/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"condense-newlines": "^0.2.1",
|
||||
"extend-shallow": "^2.0.1",
|
||||
"js-beautify": "^1.6.12"
|
||||
},
|
||||
"description": "Some tweaks for beautifying HTML with js-beautify according to my preferences.",
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^0.1.12",
|
||||
"mocha": "^3.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/jonschlinkert/pretty",
|
||||
"keywords": [
|
||||
"beautify",
|
||||
"format",
|
||||
"formatter",
|
||||
"html",
|
||||
"js",
|
||||
"js-beautify",
|
||||
"prettify",
|
||||
"pretty"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "pretty",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/pretty.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
},
|
||||
"version": "2.0.0"
|
||||
}
|
||||
Reference in New Issue
Block a user