Skip to content

Instantly share code, notes, and snippets.

View staeke's full-sized avatar

Staffan Eketorp staeke

  • Apple
  • Cupertino
View GitHub Profile
@staeke
staeke / simplify-names.js
Created June 19, 2020 18:59
SimplifyNamesPlugin
// This is a hack to just simplify variable namings, because they're ugly, for easier debugging
const HarmonyImportDependency = require('webpack/lib/dependencies/HarmonyImportDependency');
const HarmonyImportSpecifierDependency = require('webpack/lib/dependencies/HarmonyImportSpecifierDependency');
const HarmonyImportSpecifierDependencyTemplate = HarmonyImportSpecifierDependency.Template;
const path = require('path');
const HIDproto = HarmonyImportDependency.prototype;
const HISDTproto = HarmonyImportSpecifierDependencyTemplate.prototype;
const originalGetImportVar = HIDproto.getImportVar;
<h4 class="inline-block align-middle">A header here</h4>
<span class="left-sm inline-block align-middle code">{ .someCode }</span>
<span class="left-sm inline-block align-middle" style="padding: 20px; height: 100px; width: 100px; border: 1px solid black">And a little box</span>
<span class="tag [active] [exclusive]">Tag title</span>
<span class="tag [active] [exclusive]">Tag with delete <span>&times;</span> </span>
<span class="tag [active] [exclusive]">Tag title</span>
<span class="tag [active] [exclusive]">Tag with delete <span>&times;</span> </span>