This technical design provides a comprehensive overview on the types and functionality necessary to correlate data gathered by the parsers
run over a variable number of contentDirectories
into a data structure that can both guide the transformations in the generate
phase as well be persisted across NPMify
runs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
#| What does our valof defunctionalize? |# | |
;; So far we fully defunctionalized environments and closures. Rather | |
;; than explicit higher-order function calls, we instead dispatch | |
;; against the choices, where we have represented each choice with a | |
;; corresponding data structure. | |
;; Josh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { makeVar } from '@apollo/client'; | |
import { Chip, FormControlLabel, InputBase } from '@material-ui/core'; | |
import React, { useCallback, useEffect, useRef, useState } from 'react'; | |
import { snackbarState } from 'state/snackbarState'; | |
import styled from 'styled-components'; | |
import { onEnterPress } from 'utils/helpers'; | |
import { millisToSeconds, secondsToMillis } from 'utils/time'; | |
const disableOtherChips = makeVar<boolean>(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { applyMiddleware, createStore, Action, ActionCreator, Middleware, AnyAction } from "redux"; | |
import thunkMiddleware, { ThunkAction, ThunkMiddleware, ThunkDispatch } from "redux-thunk"; | |
interface IRootState { | |
derp: string; | |
} | |
const initialState: IRootState = { | |
derp: "fug" | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the type of the first argument of a function | |
type ArgumentType<T> = T extends (a: infer U) => any ? U : any; | |
// Get the head type from a tuple of types | |
type Head<T extends any[]> = T extends [infer H, ...any[]] ? H : never; | |
// Get the tail type from a tuple of types | |
type Tail<T extends any[]> = ((...t: T) => void) extends ((h: any, ...rest: infer R) => void) ? R : never; | |
// Get the Last type from a tuple of types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @ts-ignore @types/memfs does not exist | |
import {createFsFromVolume, Volume} from "memfs"; | |
import path from "path"; | |
// Create a mocked filesystem instance | |
const mockFs = createFsFromVolume(Volume.fromJSON({})); | |
jest.mock("fs", () => mockFs); | |
// Import modules that should be using the mocked filesystem | |
import {proteus} from "@proteus/core"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Polyfill indexOf. */ | |
var indexOf; | |
if (typeof Array.prototype.indexOf === 'function') { | |
indexOf = function (haystack, needle) { | |
return haystack.indexOf(needle); | |
}; | |
} else { | |
indexOf = function (haystack, needle) { | |
var i = 0, length = haystack.length, idx = -1, found = false; |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh