Skip to content

Instantly share code, notes, and snippets.

View thepassle's full-sized avatar

Pascal Schilp thepassle

View GitHub Profile
Privacy Policy for The Grim Extension
Effective Date: 29-04-2025
The Grim Extension ("the Extension") does not collect, use, or share any personal data or user information.
Data Collection
The Extension temporarily stores the following data:
Game State: Information about the current state of the game.
- Usernames: Names of the players participating in the game.
- This data is stored only temporarily for a maximum of 5 minutes to facilitate gameplay features.
{
"date": "2025-04-21T14:34:43.936Z",
"script": "Trouble Brewing",
"result": "win",
"players": [
{
"tokens": [],
"me": true,
"name": "pascal",
"id": "2bab8c99-5c33-49ea-a3e7-39085b97fe7a",
import { pathToFileURL } from 'url';
import { createModuleGraph } from '@thepassle/module-graph';
import { nodeResolve } from '@rollup/plugin-node-resolve';
function createResolve(resolveOptions = {}) {
const r = nodeResolve(resolveOptions);
return {
resolve() {
return null;
import fs from "fs";
import path from "path";
import { pathToFileURL, fileURLToPath } from "url";
import { builtinModules } from "module";
import { init, parse } from "es-module-lexer";
import { moduleResolve } from "import-meta-resolve";
/**
* @param {string} specifier
* @returns {boolean}
import fs from "fs";
import path from "path";
import { pathToFileURL, fileURLToPath } from "url";
import { builtinModules } from "module";
import { init, parse } from "es-module-lexer";
import { moduleResolve } from "import-meta-resolve";
class ModuleGraph {
/**
* @param {string} basePath
@thepassle
thepassle / swsr.js
Last active April 23, 2024 08:17
swsr.js
import { defineConfig } from 'astro/config';
import netlify from '@astrojs/netlify';
import path from 'path';
import fs from 'fs';
import { injectManifest } from 'workbox-build';
import { build } from "esbuild";
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
@thepassle
thepassle / conclusion.md
Last active January 19, 2022 10:08
css modules conclusion

Fwiw, the past couple of weeks I've been working on supporting import assertions and CSS/JSON modules in our app at work, I thought it might be worth to share the experience and also prompted by this, maybe its helpful to someone looking into doing the same.

We currently transform our app to Systemjs. My initial thought was to start using es-module-shims, for several reasons:

  • We use importmaps
  • It supports CSS/JSON modules
  • It would save a buildtime transformation to Systemjs

I initially thought that bundling from ESM to ESM would be at least somewhat noticeably faster than bundling from ESM to Systemjs, because of the code transform, but after running some benchmarks in our pipeline, it seemed to not make a significant difference.

image (5)

@thepassle
thepassle / generateReadme.js
Last active February 16, 2021 19:32
Generate README files for generic-components as a custom-elements-manifest plugin
import path from 'path';
import fs from 'fs';
import { customElementsManifestToMarkdown } from '../custom-elements-json-to-markdown/index.js';
function generateReadme() {
const components = ['generic-disclosure', 'generic-switch'];
const fauxCEM = {"modules": [{"declarations": []}];
return {
packageLinkPhase(cem) {
const classDocForComponents = [];
@thepassle
thepassle / ajax.md
Last active February 12, 2021 10:25

./index.js:

Exports

kind name declaration module package
js ajax ajax ./src/ajax.js
js setAjax setAjax ./src/ajax.js
js AjaxClass AjaxClass ./src/AjaxClass.js
js cancelInterceptorFactory cancelInterceptorFactory ./src/interceptors.js

./fixtures/-TEST/package/my-element.js:

class: SuperClass

Superclass

name module package
LitElement lit-element