WIP - add extractor, generate snippet_data

This commit is contained in:
Stefan Fejes
2019-08-20 15:52:05 +02:00
parent 88084d3d30
commit cc8f1d8a7a
37396 changed files with 4588842 additions and 133 deletions

19
node_modules/logalot/LICENSE.md generated vendored Normal file
View File

@ -0,0 +1,19 @@
Copyright (c) Kevin Mårtensson
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.

33
node_modules/logalot/README.md generated vendored Normal file
View File

@ -0,0 +1,33 @@
# logalot [![Build Status](http://img.shields.io/travis/imagemin/logalot.svg?style=flat)](https://travis-ci.org/imagemin/logalot)
> Tiny log utility
## Install
```sh
$ npm install --save logalot
```
## Usage
```js
var log = require('logalot');
log.info('this is a message');
log.warn('this is a warning');
log.success('this is a success message');
log.error(new Error('this is a error').stack);
/*
this is a message
⚠ this is a warning
✔ this is a success message
✖ Error: this is an error
at ChildProcess.exithandler (child_process.js:648:15)
at ChildProcess.emit (events.js:98:17)
*/
```
## License
MIT © [imagemin](https://github.com/imagemin)

40
node_modules/logalot/index.js generated vendored Normal file
View File

@ -0,0 +1,40 @@
'use strict';
var figures = require('figures');
var Squeak = require('squeak');
/**
* Initialize `log`
*/
var log = new Squeak({separator: ' '});
/**
* Add types
*/
log.type('info', {
color: 'cyan',
prefix: figures.info
});
log.type('warn', {
color: 'yellow',
prefix: figures.warning
});
log.type('success', {
color: 'green',
prefix: figures.tick
});
log.type('error', {
color: 'red',
prefix: figures.cross
});
/**
* Module exports
*/
module.exports = log;

147
node_modules/logalot/node_modules/figures/index.js generated vendored Normal file
View File

@ -0,0 +1,147 @@
'use strict';
var objectAssign = require('object-assign');
var escapeStringRegexp = require('escape-string-regexp');
var platform = process.platform;
var main = {
tick: '✔',
cross: '✖',
star: '★',
square: '▇',
squareSmall: '◻',
squareSmallFilled: '◼',
play: '▶',
circle: '◯',
circleFilled: '◉',
circleDotted: '◌',
circleDouble: '◎',
circleCircle: 'ⓞ',
circleCross: 'ⓧ',
circlePipe: 'Ⓘ',
circleQuestionMark: '?⃝',
bullet: '●',
dot: '',
line: '─',
ellipsis: '…',
pointer: '',
pointerSmall: '',
info: '',
warning: '⚠',
hamburger: '☰',
smiley: '㋡',
mustache: '෴',
heart: '♥',
arrowUp: '↑',
arrowDown: '↓',
arrowLeft: '←',
arrowRight: '→',
radioOn: '◉',
radioOff: '◯',
checkboxOn: '☒',
checkboxOff: '☐',
checkboxCircleOn: 'ⓧ',
checkboxCircleOff: 'Ⓘ',
questionMarkPrefix: '?⃝',
oneHalf: '½',
oneThird: '⅓',
oneQuarter: '¼',
oneFifth: '⅕',
oneSixth: '⅙',
oneSeventh: '⅐',
oneEighth: '⅛',
oneNinth: '⅑',
oneTenth: '⅒',
twoThirds: '⅔',
twoFifths: '⅖',
threeQuarters: '¾',
threeFifths: '⅗',
threeEighths: '⅜',
fourFifths: '⅘',
fiveSixths: '⅚',
fiveEighths: '⅝',
sevenEighths: '⅞'
};
var win = {
tick: '√',
cross: '×',
star: '*',
square: '█',
squareSmall: '[ ]',
squareSmallFilled: '[█]',
play: '►',
circle: '( )',
circleFilled: '(*)',
circleDotted: '( )',
circleDouble: '( )',
circleCircle: '(○)',
circleCross: '(×)',
circlePipe: '(│)',
circleQuestionMark: '(?)',
bullet: '*',
dot: '.',
line: '─',
ellipsis: '...',
pointer: '>',
pointerSmall: '»',
info: 'i',
warning: '‼',
hamburger: '≡',
smiley: '☺',
mustache: '┌─┐',
heart: main.heart,
arrowUp: main.arrowUp,
arrowDown: main.arrowDown,
arrowLeft: main.arrowLeft,
arrowRight: main.arrowRight,
radioOn: '(*)',
radioOff: '( )',
checkboxOn: '[×]',
checkboxOff: '[ ]',
checkboxCircleOn: '(×)',
checkboxCircleOff: '( )',
questionMarkPrefix: '',
oneHalf: '1/2',
oneThird: '1/3',
oneQuarter: '1/4',
oneFifth: '1/5',
oneSixth: '1/6',
oneSeventh: '1/7',
oneEighth: '1/8',
oneNinth: '1/9',
oneTenth: '1/10',
twoThirds: '2/3',
twoFifths: '2/5',
threeQuarters: '3/4',
threeFifths: '3/5',
threeEighths: '3/8',
fourFifths: '4/5',
fiveSixths: '5/6',
fiveEighths: '5/8',
sevenEighths: '7/8'
};
if (platform === 'linux') {
// the main one doesn't look that good on Ubuntu
main.questionMarkPrefix = '?';
}
var figures = platform === 'win32' ? win : main;
var fn = function (str) {
if (figures === main) {
return str;
}
Object.keys(main).forEach(function (key) {
if (main[key] === figures[key]) {
return;
}
str = str.replace(new RegExp(escapeStringRegexp(main[key]), 'g'), figures[key]);
});
return str;
};
module.exports = objectAssign(fn, figures);

21
node_modules/logalot/node_modules/figures/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.

77
node_modules/logalot/node_modules/figures/package.json generated vendored Normal file
View File

@ -0,0 +1,77 @@
{
"_from": "figures@^1.3.5",
"_id": "figures@1.7.0",
"_inBundle": false,
"_integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
"_location": "/logalot/figures",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "figures@^1.3.5",
"name": "figures",
"escapedName": "figures",
"rawSpec": "^1.3.5",
"saveSpec": null,
"fetchSpec": "^1.3.5"
},
"_requiredBy": [
"/logalot"
],
"_resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
"_shasum": "cbe1e3affcf1cd44b80cadfed28dc793a9701d2e",
"_spec": "figures@^1.3.5",
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/logalot",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/figures/issues"
},
"bundleDependencies": false,
"dependencies": {
"escape-string-regexp": "^1.0.5",
"object-assign": "^4.1.0"
},
"deprecated": false,
"description": "Unicode symbols with Windows CMD fallbacks",
"devDependencies": {
"ava": "*",
"markdown-table": "^0.4.0",
"require-uncached": "^1.0.2",
"xo": "*"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/figures#readme",
"keywords": [
"unicode",
"cli",
"cmd",
"command-line",
"characters",
"char",
"symbol",
"symbols",
"figure",
"figures",
"fallback"
],
"license": "MIT",
"name": "figures",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/figures.git"
},
"scripts": {
"make": "./makefile.js",
"test": "xo && ava"
},
"version": "1.7.0"
}

115
node_modules/logalot/node_modules/figures/readme.md generated vendored Normal file
View File

@ -0,0 +1,115 @@
# figures [![Build Status: Linux](https://travis-ci.org/sindresorhus/figures.svg?branch=master)](https://travis-ci.org/sindresorhus/figures) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/mb743hl70269be3r/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/figures/branch/master)
> Unicode symbols with Windows CMD fallbacks
[![](screenshot.png)](index.js)
[*and more...*](index.js)
Windows CMD only supports a [limited character set](http://en.wikipedia.org/wiki/Code_page_437).
## Install
```
$ npm install --save figures
```
## Usage
See the [source](index.js) for supported symbols.
```js
const figures = require('figures');
console.log(figures('✔︎ check'));
// On real OSes: ✔︎ check
// On Windows: √ check
console.log(figures.tick);
// On real OSes: ✔︎
// On Windows: √
```
## API
### figures(input)
Returns the input with replaced fallback unicode symbols on Windows.
All the below [figures](#figures) are attached to the main export as shown in the example above.
#### input
Type: `string`
String where the unicode symbols will be replaced with fallback symbols depending on the OS.
## Figures
| Name | Real OSes | Windows |
| ------------------ | :-------: | :-----: |
| tick | ✔ | √ |
| cross | ✖ | × |
| star | ★ | * |
| square | ▇ | █ |
| squareSmall | ◻ | [ ] |
| squareSmallFilled | ◼ | [█] |
| play | ▶ | ► |
| circle | ◯ | ( ) |
| circleFilled | ◉ | (*) |
| circleDotted | ◌ | ( ) |
| circleDouble | ◎ | ( ) |
| circleCircle | ⓞ | (○) |
| circleCross | ⓧ | (×) |
| circlePipe | Ⓘ | (│) |
| circleQuestionMark | ?⃝ | (?) |
| bullet | ● | * |
| dot | | . |
| line | ─ | ─ |
| ellipsis | … | ... |
| pointer | | > |
| pointerSmall | | » |
| info | | i |
| warning | ⚠ | ‼ |
| hamburger | ☰ | ≡ |
| smiley | ㋡ | ☺ |
| mustache | ෴ | ┌─┐ |
| heart | ♥ | ♥ |
| arrowUp | ↑ | ↑ |
| arrowDown | ↓ | ↓ |
| arrowLeft | ← | ← |
| arrowRight | → | → |
| radioOn | ◉ | (*) |
| radioOff | ◯ | ( ) |
| checkboxOn | ☒ | [×] |
| checkboxOff | ☐ | [ ] |
| checkboxCircleOn | ⓧ | (×) |
| checkboxCircleOff | Ⓘ | ( ) |
| questionMarkPrefix | ?⃝ | |
| oneHalf | ½ | 1/2 |
| oneThird | ⅓ | 1/3 |
| oneQuarter | ¼ | 1/4 |
| oneFifth | ⅕ | 1/5 |
| oneSixth | ⅙ | 1/6 |
| oneSeventh | ⅐ | 1/7 |
| oneEighth | ⅛ | 1/8 |
| oneNinth | ⅑ | 1/9 |
| oneTenth | ⅒ | 1/10 |
| twoThirds | ⅔ | 2/3 |
| twoFifths | ⅖ | 2/5 |
| threeQuarters | ¾ | 3/4 |
| threeFifths | ⅗ | 3/5 |
| threeEighths | ⅜ | 3/8 |
| fourFifths | ⅘ | 4/5 |
| fiveSixths | ⅚ | 5/6 |
| fiveEighths | ⅝ | 5/8 |
| sevenEighths | ⅞ | 7/8 |
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

70
node_modules/logalot/package.json generated vendored Normal file
View File

@ -0,0 +1,70 @@
{
"_from": "logalot@^2.1.0",
"_id": "logalot@2.1.0",
"_inBundle": false,
"_integrity": "sha1-X46MkNME7fElMJUaVVSruMXj9VI=",
"_location": "/logalot",
"_phantomChildren": {
"escape-string-regexp": "1.0.5",
"object-assign": "4.1.1"
},
"_requested": {
"type": "range",
"registry": true,
"raw": "logalot@^2.1.0",
"name": "logalot",
"escapedName": "logalot",
"rawSpec": "^2.1.0",
"saveSpec": null,
"fetchSpec": "^2.1.0"
},
"_requiredBy": [
"/cwebp-bin",
"/mozjpeg",
"/pngquant-bin"
],
"_resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz",
"_shasum": "5f8e8c90d304edf12530951a5554abb8c5e3f552",
"_spec": "logalot@^2.1.0",
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/mozjpeg",
"author": {
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "https://github.com/kevva"
},
"bugs": {
"url": "https://github.com/imagemin/logalot/issues"
},
"bundleDependencies": false,
"dependencies": {
"figures": "^1.3.5",
"squeak": "^1.0.0"
},
"deprecated": false,
"description": "Tiny log utility",
"devDependencies": {
"ava": "^0.0.4"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/imagemin/logalot#readme",
"keywords": [
"imagemin",
"log",
"sqeak"
],
"license": "MIT",
"name": "logalot",
"repository": {
"type": "git",
"url": "git+https://github.com/imagemin/logalot.git"
},
"scripts": {
"test": "node test.js"
},
"version": "2.1.0"
}