Skip to content

Instantly share code, notes, and snippets.

View molszanski's full-sized avatar
🦕

Nick Olszanski molszanski

🦕
View GitHub Profile
@molszanski
molszanski / 3_syringe_cond.ts
Created November 13, 2022 12:50
How to register different implementations of an interface in a tsyringe container based on a given parameter
import "reflect-metadata"
import {
container,
injectable,
inject,
predicateAwareClassFactory,
} from "tsyringe"
export interface Logger {
info: (msg: string) => void
@molszanski
molszanski / Makefile
Last active November 19, 2021 16:46
Makefile example for frontend dev
bin = ./node_modules/.bin
# (spec, dot, progress, tap, landing, nyan, min (mocha --reporters))
REPORTER = spec
build-prod: ## Build a clean prod versions
@ NODE_ENV=develop \
$(bin)/webpack --config ./build/config-webpack-dist.coffee
@ cp ./assets/favicon.ico ./dist/favicon.ico