removed theme assets from repo
parent
00f9229eb2
commit
573219472a
@ -1,539 +0,0 @@
|
||||
/**
|
||||
-------------------------------
|
||||
-- Typography
|
||||
-------------------------------
|
||||
**/
|
||||
/**
|
||||
-------------------------------
|
||||
-- Colors
|
||||
-------------------------------
|
||||
**/
|
||||
/**
|
||||
-------------------------------
|
||||
-- Mixins
|
||||
-------------------------------
|
||||
**/
|
||||
/**
|
||||
-------------------------------
|
||||
-- Normalize
|
||||
-------------------------------
|
||||
**/
|
||||
html {
|
||||
line-height: 1.15;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
article,
|
||||
aside,
|
||||
footer,
|
||||
header,
|
||||
nav,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
line-height: 1em;
|
||||
}
|
||||
figcaption,
|
||||
figure,
|
||||
main {
|
||||
display: block;
|
||||
}
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
pre {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
a {
|
||||
background-color: transparent;
|
||||
-webkit-text-decoration-skip: objects;
|
||||
}
|
||||
a:active,
|
||||
a:hover {
|
||||
outline-width: 0;
|
||||
}
|
||||
abbr[title] {
|
||||
border-bottom: none;
|
||||
text-decoration: underline;
|
||||
text-decoration: underline dotted;
|
||||
}
|
||||
b,
|
||||
strong {
|
||||
font-weight: inherit;
|
||||
font-weight: bolder;
|
||||
}
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
mark {
|
||||
background-color: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
sub,
|
||||
sup {
|
||||
font-size: 60%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
sup {
|
||||
top: -0.55em;
|
||||
background: #bdcbdb;
|
||||
color: #151d26;
|
||||
border-radius: 2px;
|
||||
padding: 0 2px 0 2px;
|
||||
margin: 0 2px 0 0;
|
||||
}
|
||||
audio,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: sans-serif;
|
||||
font-size: 100%;
|
||||
line-height: 1.15;
|
||||
margin: 0;
|
||||
}
|
||||
button,
|
||||
input {
|
||||
overflow: visible;
|
||||
}
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
button,
|
||||
html [type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner,
|
||||
button::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring,
|
||||
button:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
legend {
|
||||
box-sizing: border-box;
|
||||
color: inherit;
|
||||
display: table;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
white-space: normal;
|
||||
}
|
||||
progress {
|
||||
display: inline-block;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button;
|
||||
font: inherit;
|
||||
}
|
||||
details,
|
||||
menu {
|
||||
display: block;
|
||||
}
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
canvas {
|
||||
display: inline-block;
|
||||
}
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
/**
|
||||
-------------------------------
|
||||
-- Main Structure
|
||||
-------------------------------
|
||||
**/
|
||||
html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
font: 400 1.2em/1.4em Helvetica, Arial, sans-serif;
|
||||
}
|
||||
body {
|
||||
background: #ebe5d4;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
perspective: 1px;
|
||||
transform-style: preserve-3d;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
a {
|
||||
color: #151d26;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #7ed07e;
|
||||
-moz-transition: all 0.2s linear;
|
||||
-webkit-transition: all 0.2s linear;
|
||||
-o-transition: all 0.2s linear;
|
||||
transition: all 0.2s linear;
|
||||
}
|
||||
a:hover {
|
||||
border-bottom: 1px solid #fc6399;
|
||||
}
|
||||
svg.icons {
|
||||
width: 25px;
|
||||
fill: #ebe5d4;
|
||||
}
|
||||
header {
|
||||
background: #151d26;
|
||||
height: 90%;
|
||||
width: 100%;
|
||||
border-top: #ebe5d4 3px solid;
|
||||
}
|
||||
header nav {
|
||||
width: 97%;
|
||||
margin: 10px auto;
|
||||
color: #151d26;
|
||||
}
|
||||
header nav .left,
|
||||
header nav .right {
|
||||
width: 50%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
header nav .left a.logo-link {
|
||||
border-bottom: none;
|
||||
margin: 0 0 20px 0;
|
||||
display: block;
|
||||
}
|
||||
header nav .left a.logo-link #logo {
|
||||
width: 50px;
|
||||
border-bottom: none;
|
||||
}
|
||||
header nav .right {
|
||||
text-align: right;
|
||||
}
|
||||
header nav .right a.menu-link {
|
||||
background: #fc6399;
|
||||
margin-bottom: 4px;
|
||||
padding: 3px;
|
||||
border-radius: 2px;
|
||||
display: inline-block;
|
||||
font-size: 0.8em;
|
||||
border-bottom: none;
|
||||
}
|
||||
header nav .right a.menu-link:hover {
|
||||
background: #feb1cc;
|
||||
}
|
||||
.container {
|
||||
z-index: 2;
|
||||
background: #ebe5d4;
|
||||
line-height: 30px;
|
||||
font-weight: lighter;
|
||||
width: 100%;
|
||||
color: #32302f;
|
||||
}
|
||||
.container article {
|
||||
position: relative;
|
||||
width: 80%;
|
||||
height: 80%;
|
||||
max-width: 840px;
|
||||
background: #ebe5d4;
|
||||
vertical-align: top;
|
||||
color: #32302f;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.container article .index,
|
||||
.container article .page {
|
||||
padding: 0 0 15px 0;
|
||||
}
|
||||
.container article .index img,
|
||||
.container article .page img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
.container article .index h1,
|
||||
.container article .page h1 {
|
||||
color: #151d26;
|
||||
}
|
||||
.container article .index p,
|
||||
.container article .page p {
|
||||
font: 300 1.25em/1.6em Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.container article .index .meta,
|
||||
.container article .page .meta {
|
||||
font: 500 0.8em/1.3em Helvetica, Arial, sans-serif;
|
||||
padding: 5px 0 0 0;
|
||||
border-top: 1px solid #151d26;
|
||||
background: #ede8d8;
|
||||
}
|
||||
.container article .index .meta a,
|
||||
.container article .page .meta a {
|
||||
font-size: 0.8em;
|
||||
font-weight: 400;
|
||||
}
|
||||
.container article .index .archive-item,
|
||||
.container article .page .archive-item {
|
||||
padding: 15px 0 20px 0;
|
||||
}
|
||||
.container article .index .archive-item span.year,
|
||||
.container article .page .archive-item span.year {
|
||||
font-size: 1.5em;
|
||||
font-weight: 500;
|
||||
padding: 5px;
|
||||
display: block;
|
||||
color: #151d26;
|
||||
}
|
||||
.container article .index .archive-item .archive-month,
|
||||
.container article .page .archive-item .archive-month {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 30%;
|
||||
padding: 5px;
|
||||
}
|
||||
.container article .index .archive-item .archive-month span.month,
|
||||
.container article .page .archive-item .archive-month span.month {
|
||||
color: #fc6399;
|
||||
font-size: 1.5em;
|
||||
font-weight: 300;
|
||||
padding: 5px;
|
||||
display: block;
|
||||
}
|
||||
.container section {
|
||||
padding: 0 0 20px 0;
|
||||
background: #151d26;
|
||||
}
|
||||
.container section a {
|
||||
color: #ebe5d4;
|
||||
}
|
||||
.container section .index-lists,
|
||||
.container section .page-title {
|
||||
max-width: 840px;
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
padding: 20px 0 0 0;
|
||||
}
|
||||
.container section .index-lists span,
|
||||
.container section .page-title span {
|
||||
font: 600 2em/1.5 Helvetica, Arial, sans-serif;
|
||||
color: #ebe5d4;
|
||||
}
|
||||
.container section .index-lists .recent,
|
||||
.container section .page-title .recent,
|
||||
.container section .index-lists .featured,
|
||||
.container section .page-title .featured {
|
||||
display: inline-block;
|
||||
width: 50%;
|
||||
vertical-align: top;
|
||||
}
|
||||
.container section .index-lists label,
|
||||
.container section .page-title label {
|
||||
background: #32302f;
|
||||
color: #ebe5d4;
|
||||
font-size: 1.5em;
|
||||
line-height: 1.3;
|
||||
}
|
||||
footer {
|
||||
background: #e4dcc5;
|
||||
padding: 10px;
|
||||
color: #151d26;
|
||||
font-size: 0.8em;
|
||||
font-weight: 600;
|
||||
height: 100px;
|
||||
}
|
||||
footer .inner {
|
||||
margin: 20px auto;
|
||||
width: 80%;
|
||||
max-width: 840px;
|
||||
}
|
||||
footer .inner a {
|
||||
color: #fc6399;
|
||||
}
|
||||
@media only screen and (max-width: 640px) {
|
||||
header nav {
|
||||
width: 98%;
|
||||
}
|
||||
header span {
|
||||
font-size: 2.5em;
|
||||
}
|
||||
.container article .index .archive-item .archive-month,
|
||||
.container article .page .archive-item .archive-month {
|
||||
width: 45%;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 480px) {
|
||||
header nav {
|
||||
width: 96%;
|
||||
}
|
||||
.container article .index,
|
||||
.container article .page {
|
||||
margin: 0;
|
||||
}
|
||||
.container article .index p,
|
||||
.container article .page p {
|
||||
font: 300 1em/1.6em Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.container section .index-lists .recent,
|
||||
.container section .index-lists .featured {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 375px) {
|
||||
header nav {
|
||||
width: 95%;
|
||||
}
|
||||
.container article .index,
|
||||
.container article .page {
|
||||
margin: 0;
|
||||
}
|
||||
.container article .index p,
|
||||
.container article .page p {
|
||||
font: 300 0.9em/1.7em Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.container article .index .archive-item .archive-month,
|
||||
.container article .page .archive-item .archive-month {
|
||||
width: 95%;
|
||||
}
|
||||
}
|
||||
/**
|
||||
-------------------------------
|
||||
-- Forms
|
||||
-------------------------------
|
||||
**/
|
||||
form {
|
||||
display: inline-block;
|
||||
}
|
||||
input[type=email],
|
||||
input[type=password],
|
||||
input[type=text] {
|
||||
border: 0;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
margin: 10px 5px 0 0;
|
||||
font: 15px 'RobotoMono';
|
||||
display: inline-block;
|
||||
}
|
||||
textarea {
|
||||
border: 0;
|
||||
border-radius: 3px;
|
||||
color: $type02;
|
||||
font: 15px 'RobotoMono';
|
||||
}
|
||||
button,
|
||||
input[type=submit] {
|
||||
background: #fc6399;
|
||||
color: #ebe5d4;
|
||||
font: 14px Helvetica, Arial, sans-serif;
|
||||
border-radius: 5px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
padding: 5px 5px 0 5px;
|
||||
-moz-transition: all 0.3s linear;
|
||||
-webkit-transition: all 0.3s linear;
|
||||
-o-transition: all 0.3s linear;
|
||||
transition: all 0.3s linear;
|
||||
}
|
||||
button:hover,
|
||||
input[type=submit]:hover {
|
||||
background: #fc7ca9;
|
||||
}
|
||||
select {
|
||||
font: 14px 'RobotoMono';
|
||||
border: 1px solid #fc6399;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
color: #151d26;
|
||||
}
|
||||
::-webkit-input-placeholder {
|
||||
font: 14px 'RobotoMono';
|
||||
color: #837e7c;
|
||||
}
|
||||
:-moz-placeholder {
|
||||
/* Firefox 18- */
|
||||
font: 14px 'RobotoMono';
|
||||
color: #837e7c;
|
||||
}
|
||||
::-moz-placeholder {
|
||||
/* Firefox 19+ */
|
||||
font: 14px 'RobotoMono';
|
||||
color: #837e7c;
|
||||
}
|
||||
:-ms-input-placeholder {
|
||||
font: 14px 'RobotoMono';
|
||||
color: #837e7c;
|
||||
}
|
||||
/*# sourceMappingURL=base.css.map */
|
@ -1,376 +0,0 @@
|
||||
// modules are defined as an array
|
||||
// [ module function, map of requires ]
|
||||
//
|
||||
// map of requires is short require name -> numeric require
|
||||
//
|
||||
// anything defined in a previous bundle is accessed via the
|
||||
// orig method which is the require for previous bundles
|
||||
parcelRequire = (function (modules, cache, entry, globalName) {
|
||||
// Save the require from previous bundle to this closure if any
|
||||
var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
|
||||
var nodeRequire = typeof require === 'function' && require;
|
||||
|
||||
function newRequire(name, jumped) {
|
||||
if (!cache[name]) {
|
||||
if (!modules[name]) {
|
||||
// if we cannot find the module within our internal map or
|
||||
// cache jump to the current global require ie. the last bundle
|
||||
// that was added to the page.
|
||||
var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
|
||||
if (!jumped && currentRequire) {
|
||||
return currentRequire(name, true);
|
||||
}
|
||||
|
||||
// If there are other bundles on this page the require from the
|
||||
// previous one is saved to 'previousRequire'. Repeat this as
|
||||
// many times as there are bundles until the module is found or
|
||||
// we exhaust the require chain.
|
||||
if (previousRequire) {
|
||||
return previousRequire(name, true);
|
||||
}
|
||||
|
||||
// Try the node require function if it exists.
|
||||
if (nodeRequire && typeof name === 'string') {
|
||||
return nodeRequire(name);
|
||||
}
|
||||
|
||||
var err = new Error('Cannot find module \'' + name + '\'');
|
||||
err.code = 'MODULE_NOT_FOUND';
|
||||
throw err;
|
||||
}
|
||||
|
||||
localRequire.resolve = resolve;
|
||||
localRequire.cache = {};
|
||||
|
||||
var module = cache[name] = new newRequire.Module(name);
|
||||
|
||||
modules[name][0].call(module.exports, localRequire, module, module.exports, this);
|
||||
}
|
||||
|
||||
return cache[name].exports;
|
||||
|
||||
function localRequire(x){
|
||||
return newRequire(localRequire.resolve(x));
|
||||
}
|
||||
|
||||
function resolve(x){
|
||||
return modules[name][1][x] || x;
|
||||
}
|
||||
}
|
||||
|
||||
function Module(moduleName) {
|
||||
this.id = moduleName;
|
||||
this.bundle = newRequire;
|
||||
this.exports = {};
|
||||
}
|
||||
|
||||
newRequire.isParcelRequire = true;
|
||||
newRequire.Module = Module;
|
||||
newRequire.modules = modules;
|
||||
newRequire.cache = cache;
|
||||
newRequire.parent = previousRequire;
|
||||
newRequire.register = function (id, exports) {
|
||||
modules[id] = [function (require, module) {
|
||||
module.exports = exports;
|
||||
}, {}];
|
||||
};
|
||||
|
||||
var error;
|
||||
for (var i = 0; i < entry.length; i++) {
|
||||
try {
|
||||
newRequire(entry[i]);
|
||||
} catch (e) {
|
||||
// Save first error but execute all entries
|
||||
if (!error) {
|
||||
error = e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (entry.length) {
|
||||
// Expose entry point to Node, AMD or browser globals
|
||||
// Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
|
||||
var mainExports = newRequire(entry[entry.length - 1]);
|
||||
|
||||
// CommonJS
|
||||
if (typeof exports === "object" && typeof module !== "undefined") {
|
||||
module.exports = mainExports;
|
||||
|
||||
// RequireJS
|
||||
} else if (typeof define === "function" && define.amd) {
|
||||
define(function () {
|
||||
return mainExports;
|
||||
});
|
||||
|
||||
// <script>
|
||||
} else if (globalName) {
|
||||
this[globalName] = mainExports;
|
||||
}
|
||||
}
|
||||
|
||||
// Override the current require with this new one
|
||||
parcelRequire = newRequire;
|
||||
|
||||
if (error) {
|
||||
// throw error from earlier, _after updating parcelRequire_
|
||||
throw error;
|
||||
}
|
||||
|
||||
return newRequire;
|
||||
})({"Base.mjs":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
var Base = /*#__PURE__*/function () {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
function Base() {
|
||||
_classCallCheck(this, Base);
|
||||
|
||||
this.start();
|
||||
}
|
||||
|
||||
_createClass(Base, [{
|
||||
key: "start",
|
||||
value: function start() {
|
||||
console.log('Connected like F.E.');
|
||||
} //--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
|
||||
}]);
|
||||
|
||||
return Base;
|
||||
}();
|
||||
|
||||
exports.default = Base;
|
||||
},{}],"Start.mjs":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
var _Base = _interopRequireDefault(require("./Base.mjs"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var base = new _Base.default();
|
||||
}, false);
|
||||
},{"./Base.mjs":"Base.mjs"}],"../../../../node_modules/parcel/src/builtins/hmr-runtime.js":[function(require,module,exports) {
|
||||
var global = arguments[3];
|
||||
var OVERLAY_ID = '__parcel__error__overlay__';
|
||||
var OldModule = module.bundle.Module;
|
||||
|
||||
function Module(moduleName) {
|
||||
OldModule.call(this, moduleName);
|
||||
this.hot = {
|
||||
data: module.bundle.hotData,
|
||||
_acceptCallbacks: [],
|
||||
_disposeCallbacks: [],
|
||||
accept: function (fn) {
|
||||
this._acceptCallbacks.push(fn || function () {});
|
||||
},
|
||||
dispose: function (fn) {
|
||||
this._disposeCallbacks.push(fn);
|
||||
}
|
||||
};
|
||||
module.bundle.hotData = null;
|
||||
}
|
||||
|
||||
module.bundle.Module = Module;
|
||||
var checkedAssets, assetsToAccept;
|
||||
var parent = module.bundle.parent;
|
||||
|
||||
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
|
||||
var hostname = "" || location.hostname;
|
||||
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
|
||||
var ws = new WebSocket(protocol + '://' + hostname + ':' + "53025" + '/');
|
||||
|
||||
ws.onmessage = function (event) {
|
||||
checkedAssets = {};
|
||||
assetsToAccept = [];
|
||||
var data = JSON.parse(event.data);
|
||||
|
||||
if (data.type === 'update') {
|
||||
var handled = false;
|
||||
data.assets.forEach(function (asset) {
|
||||
if (!asset.isNew) {
|
||||
var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);
|
||||
|
||||
if (didAccept) {
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
}); // Enable HMR for CSS by default.
|
||||
|
||||
handled = handled || data.assets.every(function (asset) {
|
||||
return asset.type === 'css' && asset.generated.js;
|
||||
});
|
||||
|
||||
if (handled) {
|
||||
console.clear();
|
||||
data.assets.forEach(function (asset) {
|
||||
hmrApply(global.parcelRequire, asset);
|
||||
});
|
||||
assetsToAccept.forEach(function (v) {
|
||||
hmrAcceptRun(v[0], v[1]);
|
||||
});
|
||||
} else if (location.reload) {
|
||||
// `location` global exists in a web worker context but lacks `.reload()` function.
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
if (data.type === 'reload') {
|
||||
ws.close();
|
||||
|
||||
ws.onclose = function () {
|
||||
location.reload();
|
||||
};
|
||||
}
|
||||
|
||||
if (data.type === 'error-resolved') {
|
||||
console.log('[parcel] ✨ Error resolved');
|
||||
removeErrorOverlay();
|
||||
}
|
||||
|
||||
if (data.type === 'error') {
|
||||
console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
|
||||
removeErrorOverlay();
|
||||
var overlay = createErrorOverlay(data);
|
||||
document.body.appendChild(overlay);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function removeErrorOverlay() {
|
||||
var overlay = document.getElementById(OVERLAY_ID);
|
||||
|
||||
if (overlay) {
|
||||
overlay.remove();
|
||||
}
|
||||
}
|
||||
|
||||
function createErrorOverlay(data) {
|
||||
var overlay = document.createElement('div');
|
||||
overlay.id = OVERLAY_ID; // html encode message and stack trace
|
||||
|
||||
var message = document.createElement('div');
|
||||
var stackTrace = document.createElement('pre');
|
||||
message.innerText = data.error.message;
|
||||
stackTrace.innerText = data.error.stack;
|
||||
overlay.innerHTML = '<div style="background: black; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; opacity: 0.85; font-family: Menlo, Consolas, monospace; z-index: 9999;">' + '<span style="background: red; padding: 2px 4px; border-radius: 2px;">ERROR</span>' + '<span style="top: 2px; margin-left: 5px; position: relative;">🚨</span>' + '<div style="font-size: 18px; font-weight: bold; margin-top: 20px;">' + message.innerHTML + '</div>' + '<pre>' + stackTrace.innerHTML + '</pre>' + '</div>';
|
||||
return overlay;
|
||||
}
|
||||
|
||||
function getParents(bundle, id) {
|
||||
var modules = bundle.modules;
|
||||
|
||||
if (!modules) {
|
||||
return [];
|
||||
}
|
||||
|
||||
var parents = [];
|
||||
var k, d, dep;
|
||||
|
||||
for (k in modules) {
|
||||
for (d in modules[k][1]) {
|
||||
dep = modules[k][1][d];
|
||||
|
||||
if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
|
||||
parents.push(k);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bundle.parent) {
|
||||
parents = parents.concat(getParents(bundle.parent, id));
|
||||
}
|
||||
|
||||
return parents;
|
||||
}
|
||||
|
||||
function hmrApply(bundle, asset) {
|
||||
var modules = bundle.modules;
|
||||
|
||||
if (!modules) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (modules[asset.id] || !bundle.parent) {
|
||||
var fn = new Function('require', 'module', 'exports', asset.generated.js);
|
||||
asset.isNew = !modules[asset.id];
|
||||
modules[asset.id] = [fn, asset.deps];
|
||||
} else if (bundle.parent) {
|
||||
hmrApply(bundle.parent, asset);
|
||||
}
|
||||
}
|
||||
|
||||
function hmrAcceptCheck(bundle, id) {
|
||||
var modules = bundle.modules;
|
||||
|
||||
if (!modules) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!modules[id] && bundle.parent) {
|
||||
return hmrAcceptCheck(bundle.parent, id);
|
||||
}
|
||||
|
||||
if (checkedAssets[id]) {
|
||||
return;
|
||||
}
|
||||
|
||||
checkedAssets[id] = true;
|
||||
var cached = bundle.cache[id];
|
||||
assetsToAccept.push([bundle, id]);
|
||||
|
||||
if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return getParents(global.parcelRequire, id).some(function (id) {
|
||||
return hmrAcceptCheck(global.parcelRequire, id);
|
||||
});
|
||||
}
|
||||
|
||||
function hmrAcceptRun(bundle, id) {
|
||||
var cached = bundle.cache[id];
|
||||
bundle.hotData = {};
|
||||
|
||||
if (cached) {
|
||||
cached.hot.data = bundle.hotData;
|
||||
}
|
||||
|
||||
if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
|
||||
cached.hot._disposeCallbacks.forEach(function (cb) {
|
||||
cb(bundle.hotData);
|
||||
});
|
||||
}
|
||||
|
||||
delete bundle.cache[id];
|
||||
bundle(id);
|
||||
cached = bundle.cache[id];
|
||||
|
||||
if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
|
||||
cached.hot._acceptCallbacks.forEach(function (cb) {
|
||||
cb();
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},{}]},{},["../../../../node_modules/parcel/src/builtins/hmr-runtime.js","Start.mjs"], null)
|
||||
//# sourceMappingURL=/start.min.js.map
|
Loading…
Reference in New Issue