mirror of
https://github.com/parchlinuxB/Gitee.git
synced 2025-02-23 02:15:43 -05:00
icon2jinja improvement
This commit is contained in:
parent
ee601ff37d
commit
cb3f9dba7b
6 changed files with 827 additions and 15 deletions
|
@ -0,0 +1,591 @@
|
|||
// 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
|
||||
|
||||
(function (modules, entry, mainEntry, parcelRequireName, globalName) {
|
||||
/* eslint-disable no-undef */
|
||||
var globalObject =
|
||||
typeof globalThis !== 'undefined'
|
||||
? globalThis
|
||||
: typeof self !== 'undefined'
|
||||
? self
|
||||
: typeof window !== 'undefined'
|
||||
? window
|
||||
: typeof global !== 'undefined'
|
||||
? global
|
||||
: {};
|
||||
/* eslint-enable no-undef */
|
||||
|
||||
// Save the require from previous bundle to this closure if any
|
||||
var previousRequire =
|
||||
typeof globalObject[parcelRequireName] === 'function' &&
|
||||
globalObject[parcelRequireName];
|
||||
|
||||
var cache = previousRequire.cache || {};
|
||||
// Do not use `require` to prevent Webpack from trying to bundle this call
|
||||
var nodeRequire =
|
||||
typeof module !== 'undefined' &&
|
||||
typeof module.require === 'function' &&
|
||||
module.require.bind(module);
|
||||
|
||||
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 globalObject[parcelRequireName] === 'function' &&
|
||||
globalObject[parcelRequireName];
|
||||
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,
|
||||
globalObject
|
||||
);
|
||||
}
|
||||
|
||||
return cache[name].exports;
|
||||
|
||||
function localRequire(x) {
|
||||
var res = localRequire.resolve(x);
|
||||
return res === false ? {} : newRequire(res);
|
||||
}
|
||||
|
||||
function resolve(x) {
|
||||
var id = modules[name][1][x];
|
||||
return id != null ? id : 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;
|
||||
},
|
||||
{},
|
||||
];
|
||||
};
|
||||
|
||||
Object.defineProperty(newRequire, 'root', {
|
||||
get: function () {
|
||||
return globalObject[parcelRequireName];
|
||||
},
|
||||
});
|
||||
|
||||
globalObject[parcelRequireName] = newRequire;
|
||||
|
||||
for (var i = 0; i < entry.length; i++) {
|
||||
newRequire(entry[i]);
|
||||
}
|
||||
|
||||
if (mainEntry) {
|
||||
// Expose entry point to Node, AMD or browser globals
|
||||
// Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
|
||||
var mainExports = newRequire(mainEntry);
|
||||
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
})({"1Y09f":[function(require,module,exports,__globalThis) {
|
||||
var global = arguments[3];
|
||||
var HMR_HOST = null;
|
||||
var HMR_PORT = null;
|
||||
var HMR_SECURE = false;
|
||||
var HMR_ENV_HASH = "42036d7a98ade5a7";
|
||||
var HMR_USE_SSE = false;
|
||||
module.bundle.HMR_BUNDLE_ID = "57ebb8ca02f51cb6";
|
||||
"use strict";
|
||||
/* global HMR_HOST, HMR_PORT, HMR_ENV_HASH, HMR_SECURE, HMR_USE_SSE, chrome, browser, __parcel__import__, __parcel__importScripts__, ServiceWorkerGlobalScope */ /*::
|
||||
import type {
|
||||
HMRAsset,
|
||||
HMRMessage,
|
||||
} from '@parcel/reporter-dev-server/src/HMRServer.js';
|
||||
interface ParcelRequire {
|
||||
(string): mixed;
|
||||
cache: {|[string]: ParcelModule|};
|
||||
hotData: {|[string]: mixed|};
|
||||
Module: any;
|
||||
parent: ?ParcelRequire;
|
||||
isParcelRequire: true;
|
||||
modules: {|[string]: [Function, {|[string]: string|}]|};
|
||||
HMR_BUNDLE_ID: string;
|
||||
root: ParcelRequire;
|
||||
}
|
||||
interface ParcelModule {
|
||||
hot: {|
|
||||
data: mixed,
|
||||
accept(cb: (Function) => void): void,
|
||||
dispose(cb: (mixed) => void): void,
|
||||
// accept(deps: Array<string> | string, cb: (Function) => void): void,
|
||||
// decline(): void,
|
||||
_acceptCallbacks: Array<(Function) => void>,
|
||||
_disposeCallbacks: Array<(mixed) => void>,
|
||||
|};
|
||||
}
|
||||
interface ExtensionContext {
|
||||
runtime: {|
|
||||
reload(): void,
|
||||
getURL(url: string): string;
|
||||
getManifest(): {manifest_version: number, ...};
|
||||
|};
|
||||
}
|
||||
declare var module: {bundle: ParcelRequire, ...};
|
||||
declare var HMR_HOST: string;
|
||||
declare var HMR_PORT: string;
|
||||
declare var HMR_ENV_HASH: string;
|
||||
declare var HMR_SECURE: boolean;
|
||||
declare var HMR_USE_SSE: boolean;
|
||||
declare var chrome: ExtensionContext;
|
||||
declare var browser: ExtensionContext;
|
||||
declare var __parcel__import__: (string) => Promise<void>;
|
||||
declare var __parcel__importScripts__: (string) => Promise<void>;
|
||||
declare var globalThis: typeof self;
|
||||
declare var ServiceWorkerGlobalScope: Object;
|
||||
*/ var OVERLAY_ID = '__parcel__error__overlay__';
|
||||
var OldModule = module.bundle.Module;
|
||||
function Module(moduleName) {
|
||||
OldModule.call(this, moduleName);
|
||||
this.hot = {
|
||||
data: module.bundle.hotData[moduleName],
|
||||
_acceptCallbacks: [],
|
||||
_disposeCallbacks: [],
|
||||
accept: function(fn) {
|
||||
this._acceptCallbacks.push(fn || function() {});
|
||||
},
|
||||
dispose: function(fn) {
|
||||
this._disposeCallbacks.push(fn);
|
||||
}
|
||||
};
|
||||
module.bundle.hotData[moduleName] = undefined;
|
||||
}
|
||||
module.bundle.Module = Module;
|
||||
module.bundle.hotData = {};
|
||||
var checkedAssets /*: {|[string]: boolean|} */ , assetsToDispose /*: Array<[ParcelRequire, string]> */ , assetsToAccept /*: Array<[ParcelRequire, string]> */ ;
|
||||
function getHostname() {
|
||||
return HMR_HOST || (location.protocol.indexOf('http') === 0 ? location.hostname : 'localhost');
|
||||
}
|
||||
function getPort() {
|
||||
return HMR_PORT || location.port;
|
||||
}
|
||||
// eslint-disable-next-line no-redeclare
|
||||
var parent = module.bundle.parent;
|
||||
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
|
||||
var hostname = getHostname();
|
||||
var port = getPort();
|
||||
var protocol = HMR_SECURE || location.protocol == 'https:' && ![
|
||||
'localhost',
|
||||
'127.0.0.1',
|
||||
'0.0.0.0'
|
||||
].includes(hostname) ? 'wss' : 'ws';
|
||||
var ws;
|
||||
if (HMR_USE_SSE) ws = new EventSource('/__parcel_hmr');
|
||||
else try {
|
||||
ws = new WebSocket(protocol + '://' + hostname + (port ? ':' + port : '') + '/');
|
||||
} catch (err) {
|
||||
if (err.message) console.error(err.message);
|
||||
ws = {};
|
||||
}
|
||||
// Web extension context
|
||||
var extCtx = typeof browser === 'undefined' ? typeof chrome === 'undefined' ? null : chrome : browser;
|
||||
// Safari doesn't support sourceURL in error stacks.
|
||||
// eval may also be disabled via CSP, so do a quick check.
|
||||
var supportsSourceURL = false;
|
||||
try {
|
||||
(0, eval)('throw new Error("test"); //# sourceURL=test.js');
|
||||
} catch (err) {
|
||||
supportsSourceURL = err.stack.includes('test.js');
|
||||
}
|
||||
// $FlowFixMe
|
||||
ws.onmessage = async function(event /*: {data: string, ...} */ ) {
|
||||
checkedAssets = {} /*: {|[string]: boolean|} */ ;
|
||||
assetsToAccept = [];
|
||||
assetsToDispose = [];
|
||||
var data /*: HMRMessage */ = JSON.parse(event.data);
|
||||
if (data.type === 'reload') fullReload();
|
||||
else if (data.type === 'update') {
|
||||
// Remove error overlay if there is one
|
||||
if (typeof document !== 'undefined') removeErrorOverlay();
|
||||
let assets = data.assets.filter((asset)=>asset.envHash === HMR_ENV_HASH);
|
||||
// Handle HMR Update
|
||||
let handled = assets.every((asset)=>{
|
||||
return asset.type === 'css' || asset.type === 'js' && hmrAcceptCheck(module.bundle.root, asset.id, asset.depsByBundle);
|
||||
});
|
||||
if (handled) {
|
||||
console.clear();
|
||||
// Dispatch custom event so other runtimes (e.g React Refresh) are aware.
|
||||
if (typeof window !== 'undefined' && typeof CustomEvent !== 'undefined') window.dispatchEvent(new CustomEvent('parcelhmraccept'));
|
||||
await hmrApplyUpdates(assets);
|
||||
// Dispose all old assets.
|
||||
let processedAssets = {} /*: {|[string]: boolean|} */ ;
|
||||
for(let i = 0; i < assetsToDispose.length; i++){
|
||||
let id = assetsToDispose[i][1];
|
||||
if (!processedAssets[id]) {
|
||||
hmrDispose(assetsToDispose[i][0], id);
|
||||
processedAssets[id] = true;
|
||||
}
|
||||
}
|
||||
// Run accept callbacks. This will also re-execute other disposed assets in topological order.
|
||||
processedAssets = {};
|
||||
for(let i = 0; i < assetsToAccept.length; i++){
|
||||
let id = assetsToAccept[i][1];
|
||||
if (!processedAssets[id]) {
|
||||
hmrAccept(assetsToAccept[i][0], id);
|
||||
processedAssets[id] = true;
|
||||
}
|
||||
}
|
||||
} else fullReload();
|
||||
}
|
||||
if (data.type === 'error') {
|
||||
// Log parcel errors to console
|
||||
for (let ansiDiagnostic of data.diagnostics.ansi){
|
||||
let stack = ansiDiagnostic.codeframe ? ansiDiagnostic.codeframe : ansiDiagnostic.stack;
|
||||
console.error("\uD83D\uDEA8 [parcel]: " + ansiDiagnostic.message + '\n' + stack + '\n\n' + ansiDiagnostic.hints.join('\n'));
|
||||
}
|
||||
if (typeof document !== 'undefined') {
|
||||
// Render the fancy html overlay
|
||||
removeErrorOverlay();
|
||||
var overlay = createErrorOverlay(data.diagnostics.html);
|
||||
// $FlowFixMe
|
||||
document.body.appendChild(overlay);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (ws instanceof WebSocket) {
|
||||
ws.onerror = function(e) {
|
||||
if (e.message) console.error(e.message);
|
||||
};
|
||||
ws.onclose = function() {
|
||||
console.warn("[parcel] \uD83D\uDEA8 Connection to the HMR server was lost");
|
||||
};
|
||||
}
|
||||
}
|
||||
function removeErrorOverlay() {
|
||||
var overlay = document.getElementById(OVERLAY_ID);
|
||||
if (overlay) {
|
||||
overlay.remove();
|
||||
console.log("[parcel] \u2728 Error resolved");
|
||||
}
|
||||
}
|
||||
function createErrorOverlay(diagnostics) {
|
||||
var overlay = document.createElement('div');
|
||||
overlay.id = OVERLAY_ID;
|
||||
let errorHTML = '<div style="background: black; opacity: 0.85; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; font-family: Menlo, Consolas, monospace; z-index: 9999;">';
|
||||
for (let diagnostic of diagnostics){
|
||||
let stack = diagnostic.frames.length ? diagnostic.frames.reduce((p, frame)=>{
|
||||
return `${p}
|
||||
<a href="/__parcel_launch_editor?file=${encodeURIComponent(frame.location)}" style="text-decoration: underline; color: #888" onclick="fetch(this.href); return false">${frame.location}</a>
|
||||
${frame.code}`;
|
||||
}, '') : diagnostic.stack;
|
||||
errorHTML += `
|
||||
<div>
|
||||
<div style="font-size: 18px; font-weight: bold; margin-top: 20px;">
|
||||
\u{1F6A8} ${diagnostic.message}
|
||||
</div>
|
||||
<pre>${stack}</pre>
|
||||
<div>
|
||||
${diagnostic.hints.map((hint)=>"<div>\uD83D\uDCA1 " + hint + '</div>').join('')}
|
||||
</div>
|
||||
${diagnostic.documentation ? `<div>\u{1F4DD} <a style="color: violet" href="${diagnostic.documentation}" target="_blank">Learn more</a></div>` : ''}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
errorHTML += '</div>';
|
||||
overlay.innerHTML = errorHTML;
|
||||
return overlay;
|
||||
}
|
||||
function fullReload() {
|
||||
if ('reload' in location) location.reload();
|
||||
else if (extCtx && extCtx.runtime && extCtx.runtime.reload) extCtx.runtime.reload();
|
||||
}
|
||||
function getParents(bundle, id) /*: Array<[ParcelRequire, string]> */ {
|
||||
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([
|
||||
bundle,
|
||||
k
|
||||
]);
|
||||
}
|
||||
if (bundle.parent) parents = parents.concat(getParents(bundle.parent, id));
|
||||
return parents;
|
||||
}
|
||||
function updateLink(link) {
|
||||
var href = link.getAttribute('href');
|
||||
if (!href) return;
|
||||
var newLink = link.cloneNode();
|
||||
newLink.onload = function() {
|
||||
if (link.parentNode !== null) // $FlowFixMe
|
||||
link.parentNode.removeChild(link);
|
||||
};
|
||||
newLink.setAttribute('href', // $FlowFixMe
|
||||
href.split('?')[0] + '?' + Date.now());
|
||||
// $FlowFixMe
|
||||
link.parentNode.insertBefore(newLink, link.nextSibling);
|
||||
}
|
||||
var cssTimeout = null;
|
||||
function reloadCSS() {
|
||||
if (cssTimeout) return;
|
||||
cssTimeout = setTimeout(function() {
|
||||
var links = document.querySelectorAll('link[rel="stylesheet"]');
|
||||
for(var i = 0; i < links.length; i++){
|
||||
// $FlowFixMe[incompatible-type]
|
||||
var href /*: string */ = links[i].getAttribute('href');
|
||||
var hostname = getHostname();
|
||||
var servedFromHMRServer = hostname === 'localhost' ? new RegExp('^(https?:\\/\\/(0.0.0.0|127.0.0.1)|localhost):' + getPort()).test(href) : href.indexOf(hostname + ':' + getPort());
|
||||
var absolute = /^https?:\/\//i.test(href) && href.indexOf(location.origin) !== 0 && !servedFromHMRServer;
|
||||
if (!absolute) updateLink(links[i]);
|
||||
}
|
||||
cssTimeout = null;
|
||||
}, 50);
|
||||
}
|
||||
function hmrDownload(asset) {
|
||||
if (asset.type === 'js') {
|
||||
if (typeof document !== 'undefined') {
|
||||
let script = document.createElement('script');
|
||||
script.src = asset.url + '?t=' + Date.now();
|
||||
if (asset.outputFormat === 'esmodule') script.type = 'module';
|
||||
return new Promise((resolve, reject)=>{
|
||||
var _document$head;
|
||||
script.onload = ()=>resolve(script);
|
||||
script.onerror = reject;
|
||||
(_document$head = document.head) === null || _document$head === void 0 || _document$head.appendChild(script);
|
||||
});
|
||||
} else if (typeof importScripts === 'function') {
|
||||
// Worker scripts
|
||||
if (asset.outputFormat === 'esmodule') return import(asset.url + '?t=' + Date.now());
|
||||
else return new Promise((resolve, reject)=>{
|
||||
try {
|
||||
importScripts(asset.url + '?t=' + Date.now());
|
||||
resolve();
|
||||
} catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
async function hmrApplyUpdates(assets) {
|
||||
global.parcelHotUpdate = Object.create(null);
|
||||
let scriptsToRemove;
|
||||
try {
|
||||
// If sourceURL comments aren't supported in eval, we need to load
|
||||
// the update from the dev server over HTTP so that stack traces
|
||||
// are correct in errors/logs. This is much slower than eval, so
|
||||
// we only do it if needed (currently just Safari).
|
||||
// https://bugs.webkit.org/show_bug.cgi?id=137297
|
||||
// This path is also taken if a CSP disallows eval.
|
||||
if (!supportsSourceURL) {
|
||||
let promises = assets.map((asset)=>{
|
||||
var _hmrDownload;
|
||||
return (_hmrDownload = hmrDownload(asset)) === null || _hmrDownload === void 0 ? void 0 : _hmrDownload.catch((err)=>{
|
||||
// Web extension fix
|
||||
if (extCtx && extCtx.runtime && extCtx.runtime.getManifest().manifest_version == 3 && typeof ServiceWorkerGlobalScope != 'undefined' && global instanceof ServiceWorkerGlobalScope) {
|
||||
extCtx.runtime.reload();
|
||||
return;
|
||||
}
|
||||
throw err;
|
||||
});
|
||||
});
|
||||
scriptsToRemove = await Promise.all(promises);
|
||||
}
|
||||
assets.forEach(function(asset) {
|
||||
hmrApply(module.bundle.root, asset);
|
||||
});
|
||||
} finally{
|
||||
delete global.parcelHotUpdate;
|
||||
if (scriptsToRemove) scriptsToRemove.forEach((script)=>{
|
||||
if (script) {
|
||||
var _document$head2;
|
||||
(_document$head2 = document.head) === null || _document$head2 === void 0 || _document$head2.removeChild(script);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function hmrApply(bundle /*: ParcelRequire */ , asset /*: HMRAsset */ ) {
|
||||
var modules = bundle.modules;
|
||||
if (!modules) return;
|
||||
if (asset.type === 'css') reloadCSS();
|
||||
else if (asset.type === 'js') {
|
||||
let deps = asset.depsByBundle[bundle.HMR_BUNDLE_ID];
|
||||
if (deps) {
|
||||
if (modules[asset.id]) {
|
||||
// Remove dependencies that are removed and will become orphaned.
|
||||
// This is necessary so that if the asset is added back again, the cache is gone, and we prevent a full page reload.
|
||||
let oldDeps = modules[asset.id][1];
|
||||
for(let dep in oldDeps)if (!deps[dep] || deps[dep] !== oldDeps[dep]) {
|
||||
let id = oldDeps[dep];
|
||||
let parents = getParents(module.bundle.root, id);
|
||||
if (parents.length === 1) hmrDelete(module.bundle.root, id);
|
||||
}
|
||||
}
|
||||
if (supportsSourceURL) // Global eval. We would use `new Function` here but browser
|
||||
// support for source maps is better with eval.
|
||||
(0, eval)(asset.output);
|
||||
// $FlowFixMe
|
||||
let fn = global.parcelHotUpdate[asset.id];
|
||||
modules[asset.id] = [
|
||||
fn,
|
||||
deps
|
||||
];
|
||||
} else if (bundle.parent) hmrApply(bundle.parent, asset);
|
||||
}
|
||||
}
|
||||
function hmrDelete(bundle, id) {
|
||||
let modules = bundle.modules;
|
||||
if (!modules) return;
|
||||
if (modules[id]) {
|
||||
// Collect dependencies that will become orphaned when this module is deleted.
|
||||
let deps = modules[id][1];
|
||||
let orphans = [];
|
||||
for(let dep in deps){
|
||||
let parents = getParents(module.bundle.root, deps[dep]);
|
||||
if (parents.length === 1) orphans.push(deps[dep]);
|
||||
}
|
||||
// Delete the module. This must be done before deleting dependencies in case of circular dependencies.
|
||||
delete modules[id];
|
||||
delete bundle.cache[id];
|
||||
// Now delete the orphans.
|
||||
orphans.forEach((id)=>{
|
||||
hmrDelete(module.bundle.root, id);
|
||||
});
|
||||
} else if (bundle.parent) hmrDelete(bundle.parent, id);
|
||||
}
|
||||
function hmrAcceptCheck(bundle /*: ParcelRequire */ , id /*: string */ , depsByBundle /*: ?{ [string]: { [string]: string } }*/ ) {
|
||||
if (hmrAcceptCheckOne(bundle, id, depsByBundle)) return true;
|
||||
// Traverse parents breadth first. All possible ancestries must accept the HMR update, or we'll reload.
|
||||
let parents = getParents(module.bundle.root, id);
|
||||
let accepted = false;
|
||||
while(parents.length > 0){
|
||||
let v = parents.shift();
|
||||
let a = hmrAcceptCheckOne(v[0], v[1], null);
|
||||
if (a) // If this parent accepts, stop traversing upward, but still consider siblings.
|
||||
accepted = true;
|
||||
else {
|
||||
// Otherwise, queue the parents in the next level upward.
|
||||
let p = getParents(module.bundle.root, v[1]);
|
||||
if (p.length === 0) {
|
||||
// If there are no parents, then we've reached an entry without accepting. Reload.
|
||||
accepted = false;
|
||||
break;
|
||||
}
|
||||
parents.push(...p);
|
||||
}
|
||||
}
|
||||
return accepted;
|
||||
}
|
||||
function hmrAcceptCheckOne(bundle /*: ParcelRequire */ , id /*: string */ , depsByBundle /*: ?{ [string]: { [string]: string } }*/ ) {
|
||||
var modules = bundle.modules;
|
||||
if (!modules) return;
|
||||
if (depsByBundle && !depsByBundle[bundle.HMR_BUNDLE_ID]) {
|
||||
// If we reached the root bundle without finding where the asset should go,
|
||||
// there's nothing to do. Mark as "accepted" so we don't reload the page.
|
||||
if (!bundle.parent) return true;
|
||||
return hmrAcceptCheck(bundle.parent, id, depsByBundle);
|
||||
}
|
||||
if (checkedAssets[id]) return true;
|
||||
checkedAssets[id] = true;
|
||||
var cached = bundle.cache[id];
|
||||
assetsToDispose.push([
|
||||
bundle,
|
||||
id
|
||||
]);
|
||||
if (!cached || cached.hot && cached.hot._acceptCallbacks.length) {
|
||||
assetsToAccept.push([
|
||||
bundle,
|
||||
id
|
||||
]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function hmrDispose(bundle /*: ParcelRequire */ , id /*: string */ ) {
|
||||
var cached = bundle.cache[id];
|
||||
bundle.hotData[id] = {};
|
||||
if (cached && cached.hot) cached.hot.data = bundle.hotData[id];
|
||||
if (cached && cached.hot && cached.hot._disposeCallbacks.length) cached.hot._disposeCallbacks.forEach(function(cb) {
|
||||
cb(bundle.hotData[id]);
|
||||
});
|
||||
delete bundle.cache[id];
|
||||
}
|
||||
function hmrAccept(bundle /*: ParcelRequire */ , id /*: string */ ) {
|
||||
// Execute the module.
|
||||
bundle(id);
|
||||
// Run the accept callbacks in the new version of the module.
|
||||
var cached = bundle.cache[id];
|
||||
if (cached && cached.hot && cached.hot._acceptCallbacks.length) cached.hot._acceptCallbacks.forEach(function(cb) {
|
||||
var assetsToAlsoAccept = cb(function() {
|
||||
return getParents(module.bundle.root, id);
|
||||
});
|
||||
if (assetsToAlsoAccept && assetsToAccept.length) {
|
||||
assetsToAlsoAccept.forEach(function(a) {
|
||||
hmrDispose(a[0], a[1]);
|
||||
});
|
||||
// $FlowFixMe[method-unbinding]
|
||||
assetsToAccept.push.apply(assetsToAccept, assetsToAlsoAccept);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},{}],"3uyIQ":[function(require,module,exports,__globalThis) {
|
||||
console.log("Hello world!");
|
||||
|
||||
},{}]},["1Y09f","3uyIQ"], "3uyIQ", "parcelRequire94c2")
|
||||
|
|
@ -1 +0,0 @@
|
|||
console.log("test");
|
228
searx/static/themes/smart/package-lock.json
generated
228
searx/static/themes/smart/package-lock.json
generated
|
@ -6,6 +6,7 @@
|
|||
"": {
|
||||
"dependencies": {
|
||||
"ejs": "^3.1.10",
|
||||
"nodemon": "^3.1.9",
|
||||
"remixicon": "^4.5.0",
|
||||
"svgo": "^3.3.2"
|
||||
},
|
||||
|
@ -2014,6 +2015,19 @@
|
|||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/anymatch": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
|
||||
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"normalize-path": "^3.0.0",
|
||||
"picomatch": "^2.0.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/argparse": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||
|
@ -2043,6 +2057,18 @@
|
|||
"safe-buffer": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/binary-extensions": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
|
||||
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/boolbase": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
|
||||
|
@ -2063,7 +2089,6 @@
|
|||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fill-range": "^7.1.1"
|
||||
|
@ -2380,6 +2405,23 @@
|
|||
"integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==",
|
||||
"license": "CC0-1.0"
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/detect-libc": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
||||
|
@ -2582,7 +2624,6 @@
|
|||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
|
@ -2591,6 +2632,20 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/fsevents": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
|
@ -2611,6 +2666,18 @@
|
|||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/glob-parent": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"is-glob": "^4.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/globals": {
|
||||
"version": "13.24.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
|
||||
|
@ -2704,6 +2771,12 @@
|
|||
"entities": "^4.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ignore-by-default": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
|
||||
"integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/immutable": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.3.tgz",
|
||||
|
@ -2735,11 +2808,22 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/is-binary-path": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"binary-extensions": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-extglob": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
|
@ -2759,7 +2843,6 @@
|
|||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
|
||||
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-extglob": "^2.1.1"
|
||||
|
@ -2779,7 +2862,6 @@
|
|||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.12.0"
|
||||
|
@ -3161,6 +3243,12 @@
|
|||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/msgpackr": {
|
||||
"version": "1.11.2",
|
||||
"resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.11.2.tgz",
|
||||
|
@ -3260,6 +3348,100 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/nodemon": {
|
||||
"version": "3.1.9",
|
||||
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz",
|
||||
"integrity": "sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chokidar": "^3.5.2",
|
||||
"debug": "^4",
|
||||
"ignore-by-default": "^1.0.1",
|
||||
"minimatch": "^3.1.2",
|
||||
"pstree.remy": "^1.1.8",
|
||||
"semver": "^7.5.3",
|
||||
"simple-update-notifier": "^2.0.0",
|
||||
"supports-color": "^5.5.0",
|
||||
"touch": "^3.1.0",
|
||||
"undefsafe": "^2.0.5"
|
||||
},
|
||||
"bin": {
|
||||
"nodemon": "bin/nodemon.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/nodemon"
|
||||
}
|
||||
},
|
||||
"node_modules/nodemon/node_modules/chokidar": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
|
||||
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"anymatch": "~3.1.2",
|
||||
"braces": "~3.0.2",
|
||||
"glob-parent": "~5.1.2",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
"normalize-path": "~3.0.0",
|
||||
"readdirp": "~3.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.10.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/nodemon/node_modules/has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/nodemon/node_modules/readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"picomatch": "^2.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/nodemon/node_modules/supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has-flag": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/nth-check": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
|
||||
|
@ -3362,7 +3544,6 @@
|
|||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
||||
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
|
@ -3520,6 +3701,12 @@
|
|||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/pstree.remy": {
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
|
||||
"integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/react-error-overlay": {
|
||||
"version": "6.0.9",
|
||||
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz",
|
||||
|
@ -3640,7 +3827,6 @@
|
|||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
||||
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
|
@ -3659,6 +3845,18 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/simple-update-notifier": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
|
||||
"integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"semver": "^7.5.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
|
@ -3781,7 +3979,6 @@
|
|||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-number": "^7.0.0"
|
||||
|
@ -3790,6 +3987,15 @@
|
|||
"node": ">=8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/touch": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz",
|
||||
"integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"nodetouch": "bin/nodetouch.js"
|
||||
}
|
||||
},
|
||||
"node_modules/tree-kill": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
|
||||
|
@ -3836,6 +4042,12 @@
|
|||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/undefsafe": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
|
||||
"integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/update-browserslist-db": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz",
|
||||
|
|
|
@ -9,8 +9,11 @@
|
|||
"style:build": "concurrently -k -n \"RTL,LTR\" -c \"bgYellow.dim,bgGreen.dim\" -p \" {name} \" \"npm:style:build:rtl\" \"npm:style:build:ltr\"",
|
||||
"script:watch": "parcel ./src/ts/app.ts --no-source-maps --dist-dir ./js -p 10030",
|
||||
"script:build": "parcel build ./src/ts/app.ts --no-source-maps --dist-dir ./js",
|
||||
"dev": "concurrently -k -n \"STYLE,SCRIPT\" -c \"bgRed.bold,bgBlue.bold\" -p \" {name} \" \"npm:style:watch\" \"npm:script:watch\"",
|
||||
"build": "concurrently -n \"STYLE,SCRIPT\" -c \"bgRed.dim,bgBlue.dim\" -p \" {name} \" \"npm:style:build\" \"npm:script:build\""
|
||||
"icon:run": "node ./scripts/svg2jinja.js",
|
||||
"icon:watch": "nodemon --watch ./scripts/svg2jinja.js --exec npm run icon:run",
|
||||
"icon:build": "node ./scripts/svg2jinja.js --build",
|
||||
"dev": "concurrently -k -n \"STYLE,SCRIPT,ICON\" -c \"bgRed.bold,bgBlue.bold,bgMagenta\" -p \" {name} \" \"npm:style:watch\" \"npm:script:watch\" \"npm:icon:watch\"",
|
||||
"build": "concurrently -n \"STYLE,SCRIPT\" -c \"bgRed.dim,bgBlue.dim\" -p \" {name} \" \"npm:style:build\" \"npm:script:build\"; npm run icon:build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@parcel/transformer-sass": "^2.13.0",
|
||||
|
@ -19,6 +22,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"ejs": "^3.1.10",
|
||||
"nodemon": "^3.1.9",
|
||||
"remixicon": "^4.5.0",
|
||||
"svgo": "^3.3.2"
|
||||
}
|
||||
|
|
|
@ -32,7 +32,11 @@ for (const iconName in svgList) {
|
|||
});
|
||||
icons[iconName] = svgoResult.data.replace("'", "\\'");
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
console.error(`Error while processing ${svgFileName}`);
|
||||
Object.keys(icons).forEach((key) => {
|
||||
delete icons[key];
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +56,7 @@ const template = `{# this file was generated by svg2jinja.js #}
|
|||
{%- endmacro %}
|
||||
|
||||
{% macro icon_big(action, alt) -%}
|
||||
{{ icons[action] | replace("icon", "icon-big") | safe }}
|
||||
{{ icons[action] | replace("icon", "icon-big") | safe }}
|
||||
{%- endmacro %}
|
||||
`;
|
||||
|
||||
|
@ -61,4 +65,6 @@ fs.writeFileSync("../../../templates/smart/icons.html", result, {
|
|||
encoding: "utf8",
|
||||
});
|
||||
|
||||
console.log("done");
|
||||
if (Object.keys(icons).length > 0) {
|
||||
console.log("Successfully generated icons.html");
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
{%- endmacro %}
|
||||
|
||||
{% macro icon_big(action, alt) -%}
|
||||
{{ icons[action] | replace("icon", "icon-big") | safe }}
|
||||
{{ icons[action] | replace("icon", "icon-big") | safe }}
|
||||
{%- endmacro %}
|
||||
|
|
Loading…
Add table
Reference in a new issue