Project files
This commit is contained in:
5
receipeServer/frontend_old/node_modules/renderkid/CHANGELOG.md
generated
vendored
Normal file
5
receipeServer/frontend_old/node_modules/renderkid/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Renderkid Changelog
|
||||
|
||||
## `3.0.0`
|
||||
|
||||
* **Breaking change**: Dropped support for Node `<12.x`
|
||||
20
receipeServer/frontend_old/node_modules/renderkid/LICENSE
generated
vendored
Normal file
20
receipeServer/frontend_old/node_modules/renderkid/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Aria Minaei
|
||||
|
||||
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.
|
||||
189
receipeServer/frontend_old/node_modules/renderkid/README.md
generated
vendored
Normal file
189
receipeServer/frontend_old/node_modules/renderkid/README.md
generated
vendored
Normal file
@@ -0,0 +1,189 @@
|
||||
# RenderKid
|
||||
[](http://travis-ci.org/AriaMinaei/RenderKid)
|
||||
|
||||
RenderKid allows you to use HTML and CSS to style your CLI output, making it easy to create a beautiful, readable, and consistent look for your nodejs tool.
|
||||
|
||||
## Installation
|
||||
|
||||
Install with npm:
|
||||
```
|
||||
$ npm install renderkid
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```coffeescript
|
||||
RenderKid = require('renderkid')
|
||||
|
||||
r = new RenderKid()
|
||||
|
||||
r.style({
|
||||
"ul": {
|
||||
display: "block"
|
||||
margin: "2 0 2"
|
||||
}
|
||||
|
||||
"li": {
|
||||
display: "block"
|
||||
marginBottom: "1"
|
||||
}
|
||||
|
||||
"key": {
|
||||
color: "grey"
|
||||
marginRight: "1"
|
||||
}
|
||||
|
||||
"value": {
|
||||
color: "bright-white"
|
||||
}
|
||||
})
|
||||
|
||||
output = r.render("
|
||||
<ul>
|
||||
<li>
|
||||
<key>Name:</key>
|
||||
<value>RenderKid</value>
|
||||
</li>
|
||||
<li>
|
||||
<key>Version:</key>
|
||||
<value>0.2</value>
|
||||
</li>
|
||||
<li>
|
||||
<key>Last Update:</key>
|
||||
<value>Jan 2015</value>
|
||||
</li>
|
||||
</ul>
|
||||
")
|
||||
|
||||
console.log(output)
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Stylesheet properties
|
||||
|
||||
### Display mode
|
||||
|
||||
Elements can have a `display` of either `inline`, `block`, or `none`:
|
||||
```coffeescript
|
||||
r.style({
|
||||
"div": {
|
||||
display: "block"
|
||||
}
|
||||
|
||||
"span": {
|
||||
display: "inline" # default
|
||||
}
|
||||
|
||||
"hidden": {
|
||||
display: "none"
|
||||
}
|
||||
})
|
||||
|
||||
output = r.render("
|
||||
<div>This will fill one or more rows.</div>
|
||||
<span>These</span> <span>will</span> <span>be</span> in the same <span>line.</span>
|
||||
<hidden>This won't be displayed.</hidden>
|
||||
")
|
||||
|
||||
console.log(output)
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
### Margin
|
||||
|
||||
Margins work just like they do in browsers:
|
||||
```coffeescript
|
||||
r.style({
|
||||
"li": {
|
||||
display: "block"
|
||||
|
||||
marginTop: "1"
|
||||
marginRight: "2"
|
||||
marginBottom: "3"
|
||||
marginLeft: "4"
|
||||
|
||||
# or the shorthand version:
|
||||
"margin": "1 2 3 4"
|
||||
},
|
||||
|
||||
"highlight": {
|
||||
display: "inline"
|
||||
marginLeft: "2"
|
||||
marginRight: "2"
|
||||
}
|
||||
})
|
||||
|
||||
r.render("
|
||||
<ul>
|
||||
<li>Item <highlgiht>1</highlight></li>
|
||||
<li>Item <highlgiht>2</highlight></li>
|
||||
<li>Item <highlgiht>3</highlight></li>
|
||||
</ul>
|
||||
")
|
||||
```
|
||||
|
||||
### Padding
|
||||
|
||||
See margins above. Paddings work the same way, only inward.
|
||||
|
||||
### Width and Height
|
||||
|
||||
Block elements can have explicit width and height:
|
||||
```coffeescript
|
||||
r.style({
|
||||
"box": {
|
||||
display: "block"
|
||||
"width": "4"
|
||||
"height": "2"
|
||||
}
|
||||
})
|
||||
|
||||
r.render("<box>This is a box and some of its text will be truncated.</box>")
|
||||
```
|
||||
|
||||
### Colors
|
||||
|
||||
You can set a custom color and background color for each element:
|
||||
|
||||
```coffeescript
|
||||
r.style({
|
||||
"error": {
|
||||
color: "black"
|
||||
background: "red"
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
List of colors currently supported are `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`, `grey`, `bright-red`, `bright-green`, `bright-yellow`, `bright-blue`, `bright-magenta`, `bright-cyan`, `bright-white`.
|
||||
|
||||
### Bullet points
|
||||
|
||||
Block elements can have bullet points on their margins. Let's start with an example:
|
||||
```coffeescript
|
||||
r.style({
|
||||
"li": {
|
||||
# To add bullet points to an element, first you
|
||||
# should make some room for the bullet point by
|
||||
# giving your element some margin to the left:
|
||||
marginLeft: "4",
|
||||
|
||||
# Now we can add a bullet point to our margin:
|
||||
bullet: '"-"'
|
||||
}
|
||||
})
|
||||
|
||||
# The four hyphens are there for visual reference
|
||||
r.render("
|
||||
----
|
||||
<li>Item 1</li>
|
||||
<li>Item 2</li>
|
||||
<li>Item 3</li>
|
||||
----
|
||||
")
|
||||
```
|
||||
And here is the result:
|
||||
|
||||

|
||||
11
receipeServer/frontend_old/node_modules/renderkid/SECURITY.md
generated
vendored
Normal file
11
receipeServer/frontend_old/node_modules/renderkid/SECURITY.md
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 2.0.x | :white_check_mark: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Send security alerts to aria@theatrejs.com
|
||||
BIN
receipeServer/frontend_old/node_modules/renderkid/docs/images/bullets-1.png
generated
vendored
Normal file
BIN
receipeServer/frontend_old/node_modules/renderkid/docs/images/bullets-1.png
generated
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
BIN
receipeServer/frontend_old/node_modules/renderkid/docs/images/display.png
generated
vendored
Normal file
BIN
receipeServer/frontend_old/node_modules/renderkid/docs/images/display.png
generated
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
BIN
receipeServer/frontend_old/node_modules/renderkid/docs/images/usage.png
generated
vendored
Normal file
BIN
receipeServer/frontend_old/node_modules/renderkid/docs/images/usage.png
generated
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.8 KiB |
41
receipeServer/frontend_old/node_modules/renderkid/package.json
generated
vendored
Normal file
41
receipeServer/frontend_old/node_modules/renderkid/package.json
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "renderkid",
|
||||
"version": "3.0.0",
|
||||
"description": "Stylish console.log for node",
|
||||
"main": "lib/RenderKid.js",
|
||||
"dependencies": {
|
||||
"css-select": "^4.1.3",
|
||||
"dom-converter": "^0.2.0",
|
||||
"htmlparser2": "^6.1.0",
|
||||
"lodash": "^4.17.21",
|
||||
"strip-ansi": "^6.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.5",
|
||||
"@babel/preset-env": "^7.14.5",
|
||||
"chai": "^4.3.4",
|
||||
"chai-changes": "^1.3.6",
|
||||
"chai-fuzzy": "^1.6.1",
|
||||
"coffeescript": "^2.5.1",
|
||||
"mocha": "^9.1.3",
|
||||
"sinon": "^11.1.1",
|
||||
"sinon-chai": "^3.7.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha \"test/**/*.coffee\"",
|
||||
"test:watch": "npm run test -- --watch",
|
||||
"compile": "coffee --bare --transpile --output ./lib ./src",
|
||||
"compile:watch": "coffee --watch --bare --transpile --output ./lib ./src",
|
||||
"watch": "npm run compile:watch & npm run test:watch",
|
||||
"prepublish": "npm run compile"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/AriaMinaei/RenderKid.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/AriaMinaei/RenderKid/issues"
|
||||
},
|
||||
"author": "Aria Minaei",
|
||||
"license": "MIT"
|
||||
}
|
||||
Reference in New Issue
Block a user