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

21
node_modules/shallow-compare/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 Kye Hohenberger
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/shallow-compare/README.md generated vendored Normal file
View File

@ -0,0 +1,33 @@
# shallow-compare
[![npm version](https://badge.fury.io/js/shallow-compare.svg)](https://badge.fury.io/js/shallow-compare)
Stand alone shallowCompare for use in libraries that support shouldComponentUpdate
## API
`shallowCompare(instance, nextProps, nextState)`
- instance (_component instance_) - the component's instance (`this`)
- nextProps (_object_) - the next props
- nextState (_object_) - the next state
## Example
```javascript
class Foo extends Component {
constructor (props) {
super(props);
this.state = { color: 'blue' }
}
shouldComponentUpdate (nextProps, nextState) {
return shallowCompare(this, nextProps, nextState)
}
render () {
return (
<div>{this.state.color}</div>
)
}
}
```

13
node_modules/shallow-compare/es/index.js generated vendored Normal file
View File

@ -0,0 +1,13 @@
// Pulled from react-compat
// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349
function shallowDiffers(a, b) {
for (var i in a) {
if (!(i in b)) return true;
}for (var _i in b) {
if (a[_i] !== b[_i]) return true;
}return false;
}
export default (function (instance, nextProps, nextState) {
return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);
});

18
node_modules/shallow-compare/lib/index.js generated vendored Normal file
View File

@ -0,0 +1,18 @@
"use strict";
exports.__esModule = true;
// Pulled from react-compat
// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349
function shallowDiffers(a, b) {
for (var i in a) {
if (!(i in b)) return true;
}for (var _i in b) {
if (a[_i] !== b[_i]) return true;
}return false;
}
exports.default = function (instance, nextProps, nextState) {
return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);
};
module.exports = exports["default"];

66
node_modules/shallow-compare/package.json generated vendored Normal file
View File

@ -0,0 +1,66 @@
{
"_from": "shallow-compare@^1.2.2",
"_id": "shallow-compare@1.2.2",
"_inBundle": false,
"_integrity": "sha512-LUMFi+RppPlrHzbqmFnINTrazo0lPNwhcgzuAXVVcfy/mqPDrQmHAyz5bvV0gDAuRFrk804V0HpQ6u9sZ0tBeg==",
"_location": "/shallow-compare",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "shallow-compare@^1.2.2",
"name": "shallow-compare",
"escapedName": "shallow-compare",
"rawSpec": "^1.2.2",
"saveSpec": null,
"fetchSpec": "^1.2.2"
},
"_requiredBy": [
"/gatsby"
],
"_resolved": "https://registry.npmjs.org/shallow-compare/-/shallow-compare-1.2.2.tgz",
"_shasum": "fa4794627bf455a47c4f56881d8a6132d581ffdb",
"_spec": "shallow-compare@^1.2.2",
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/gatsby",
"author": "",
"bugs": {
"url": "https://github.com/tkh44/shallow-compare/issues"
},
"bundleDependencies": false,
"dependencies": {},
"deprecated": false,
"description": "Stand alone shallowCompare for use in libraries that support shouldComponentUpdate",
"devDependencies": {
"nwb": "0.15.x",
"preact": "^7.2.0",
"react": "^15.4.2",
"react-dom": "^15.4.2"
},
"files": [
"css",
"es",
"lib",
"umd"
],
"homepage": "https://github.com/tkh44/shallow-compare#readme",
"keywords": [
"react-component"
],
"license": "MIT",
"main": "lib/index.js",
"module": "es/index.js",
"name": "shallow-compare",
"repository": {
"type": "git",
"url": "git+https://github.com/tkh44/shallow-compare.git"
},
"scripts": {
"build": "nwb build-react-component",
"clean": "nwb clean-module && npm clean-demo",
"start": "nwb serve-react-demo",
"test": "nwb test-react",
"test:coverage": "nwb test-react --coverage",
"test:watch": "nwb test-react --server"
},
"version": "1.2.2"
}

112
node_modules/shallow-compare/umd/shallow-compare.js generated vendored Normal file
View File

@ -0,0 +1,112 @@
/*!
* shallow-compare v1.2.2
* MIT Licensed
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["shallowCompare"] = factory();
else
root["shallowCompare"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
// Pulled from react-compat
// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349
function shallowDiffers(a, b) {
for (var i in a) {
if (!(i in b)) return true;
}for (var _i in b) {
if (a[_i] !== b[_i]) return true;
}return false;
}
/* harmony default export */ __webpack_exports__["default"] = function (instance, nextProps, nextState) {
return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);
};
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(0);
/***/ })
/******/ ]);
});

View File

@ -0,0 +1,6 @@
/*!
* shallow-compare v1.2.2
* MIT Licensed
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.shallowCompare=t():e.shallowCompare=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,r){"use strict";function n(e,t){for(var r in e)if(!(r in t))return!0;for(var n in t)if(e[n]!==t[n])return!0;return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){return n(e.props,t)||n(e.state,r)}},function(e,t,r){e.exports=r(0)}])});
//# sourceMappingURL=shallow-compare.min.js.map

File diff suppressed because one or more lines are too long