Minimal example making webpack and wasm/Emscripten work together.
Build instructions:
- Clone this gist
 npm installnpm start- Open 
http://localhost:8080 - Look at console
 
| # frozen_string_literal: true | |
| class BeSemanticLog | |
| include RSpec::Matchers::Composable | |
| def initialize(expected) | |
| @expected = expected.is_a?(String) ? { message: expected } : expected | |
| end | |
| def matches?(event) | 
| @nix { "action": "setPhase", "phase": "unpackPhase" } | |
| unpacking sources | |
| unpacking source archive /nix/store/2ahvqr4nsxab26sijc7vfwks71c0rw0l-source | |
| source root is source | |
| @nix { "action": "setPhase", "phase": "patchPhase" } | |
| patching sources | |
| @nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" } | |
| updateAutotoolsGnuConfigScriptsPhase | |
| @nix { "action": "setPhase", "phase": "configurePhase" } | |
| configuring | 
| // This prevents error propagation, so that Storybook doesn't show its onerror report, | |
| // and the browser (or jest) doesn't display console.error messages | |
| const SilenceConsole = (props: { children: JSX.Element }) => { | |
| const [ready, setReady] = React.useState(false); | |
| React.useLayoutEffect(() => { | |
| function handler(e: ErrorEvent) { | |
| // prevent React's listener from firing | |
| e.stopImmediatePropagation(); | |
| // prevent the browser's console error message | |
| e.preventDefault(); | 
| # { stdenv, fetchFromGitHub, | |
| # mariadb, mariadb-connector-c, | |
| # boost, cmake, git, cacert, bison, icu, flex, ...}: | |
| { pkgs ? import <nixpkgs> {} }: | |
| with pkgs; | |
| stdenv.mkDerivation rec { | |
| version = "5.0.2"; | |
| pname = "manticoresearch"; | 
| (define-derived-mode cfn-mode yaml-mode | |
| "Cloudformation" | |
| "Cloudformation template mode.") | |
| (add-to-list 'magic-mode-alist | |
| '("\\(---\n\\)?AWSTemplateFormatVersion:" . cfn-mode)) | |
| (when (featurep 'flycheck) | |
| (flycheck-define-checker cfn-lint | |
| "AWS CloudFormation linter using cfn-lint. | 
| $ nix build --keep-failed --print-build-logs --argstr system aarch64-darwin -f . rpcsvc-proto | |
| rpcsvc-proto> unpacking sources | |
| rpcsvc-proto> unpacking source archive /nix/store/yrkh3121l2w45xjxgvyvz96dk8mqgn6h-source | |
| rpcsvc-proto> source root is source | |
| rpcsvc-proto> patching sources | |
| rpcsvc-proto> autoreconfPhase | |
| rpcsvc-proto> autoreconf: export WARNINGS= | |
| rpcsvc-proto> autoreconf: Entering directory '.' | |
| rpcsvc-proto> autoreconf: running: autopoint --force | |
| rpcsvc-proto> autopoint: using AM_GNU_GETTEXT_REQUIRE_VERSION instead of AM_GNU_GETTEXT_VERSION | 
| diff --git a/pkgs/development/ruby-modules/bundler-env/default.nix b/pkgs/development/ruby-modules/bundler-env/default.nix | |
| index d412d10102f..fc81d00bc5a 100644 | |
| --- a/pkgs/development/ruby-modules/bundler-env/default.nix | |
| +++ b/pkgs/development/ruby-modules/bundler-env/default.nix | |
| @@ -10,6 +10,7 @@ | |
| , gemset ? null | |
| , groups ? ["default"] | |
| , ruby ? defs.ruby | |
| +, bundler ? defs.bundler | |
| , copyGemFiles ? false # Copy gem files instead of symlinking | 
Minimal example making webpack and wasm/Emscripten work together.
Build instructions:
npm installnpm starthttp://localhost:8080| watchFor("[data-react-class='Uploader']", function() { | |
| import(/* webpackChunkName: "uploader" */ "components/uploader").then( | |
| module => { | |
| exposeComponents({ Uploader: module.default }); | |
| } | |
| ); | |
| }); | |
| watchFor("[data-react-class='AudioEditor']", function() { | |
| import(/* webpackChunkName: "AudioEditor" */ "components/audio_editor").then( | 
| (defun magit-log-trace-definition-hacks (orig-func &rest args) | |
| (if (called-interactively-p 'any) | |
| (let ((file (or (magit-file-relative-name) (user-error "Buffer isn't visiting a file"))) | |
| (fn (replace-regexp-in-string "^.*[#.:]+" "" (which-function))) | |
| (ref (or magit-buffer-refname (magit-get-current-branch) "HEAD"))) | |
| (message "%s" fn) | |
| (apply orig-func (list file fn ref))) | |
| (apply orig-func args) | |
| )) | |
| (advice-add 'magit-log-trace-definition :around #'magit-log-trace-definition-hacks) |