Skip to content

Instantly share code, notes, and snippets.

💥 ecom-web-app [NCE-1046/webpack-migration] ⚡ yarn build:dev
yarn run v1.12.3
$ cross-env NODE_ENV=development webpack -p --progress
OOOOOOOOOOOoooooOOOOOOOOooooOOOOooOoooOOoooOOooOOOooOOOoo
{ entry: [ 'babel-polyfill', './client.js' ],
output:
{ path: '/Users/alichty/lulu/ecom-web-app/build',
publicPath: '/',
filename: 'bundle.js' },
stats: { children: false },
@MrJadaml
MrJadaml / historical-commit-sizes.js
Created December 6, 2019 15:58
A script to capture historical commit sizes.
const gitlog = require('gitlog');
const util = require('util');
const path = require('path')
const fs = require('fs')
const exec = util.promisify(require('child_process').exec);
const execSync = require('child_process').execSync;
async function asyncForEach(array, callback, done) {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
const withDirSizes = {
'src': {
size: 42,
ndoes: {
'components': {
size: 42,
nodes: {
'add-to-bag': {
nodes: {
...

Startup Steps

Brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

You can run brew doctor to insure the install ran without any issues. [brew doctor]

@MrJadaml
MrJadaml / rfc-template.md
Created August 12, 2021 19:20
RFC Template

Start Date: (fill me in with today's date, YYYY-MM-DD)

Summary

Basic example

@MrJadaml
MrJadaml / basic-ts-component.tsx
Last active December 7, 2021 22:15
Some basic examples of TypeScript use in a React component.
import { FC, ChangeEvent, FormEvent, ReactElement, useState, useRef } from 'react'
interface CompProps {
prop1: string // required
prop2?: number // optional
}
export const Comp: FC<CompProps> = ({ prop1, prop2 }): ReactElement => {
const [foo, setFoo] = useState<string>('')
const [bars, setBars] = useState<string[]>([])
const Modal = ({ children, onClose }) => (
<div role="presentation">
<OutsideClickHandler onOutsideClick={onClose}>
<div> modal stuff... </div>
</OutsideClickHandler>
</div>
)
it('should close modal when clicked outside', () => {
const mockHandleClose = jest.fn()