Skip to content

Instantly share code, notes, and snippets.

Nailing It!

Kitson Kelly kitsonk

Nailing It!
View GitHub Profile

oak Individual Contributor License Agreement Thank you for your interest in contributing to oak ("We" or "Us").

This contributor agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, please sign it and send it to Us by electronic submission. This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us.

1. Definitions

"You" means the individual who Submits a Contribution to Us.

"Contribution" means any work of authorship that is Submitted by You to Us in which You own or assert ownership of the Copyright. If You do not own the Copyright in the entire work of authorship, please follow the instructions in

View broken.ts
const decoder = new TextDecoder();
async function handleRequest({ request, respondWith }: Deno.RequestEvent) {
let resolve: (response: Response) => void;
const p = new Promise<Response>((res) => {
resolve = res;
const r = respondWith(p);
let response: Response;
if (request.body) {
kitsonk / lodash_example.ts
Last active Aug 18, 2020
An example of using lodash under Deno in a type safe way.
View lodash_example.ts
// @deno-types=""
import * as lodash from "^4.17.15";
kitsonk / bronto.ts
Last active Nov 23, 2021
Example Deno Static Server
View bronto.ts
import {
} from "";
import {
View deno.d.ts
declare module 'deno' {
export = deno;
declare namespace deno {
const bytesSymbol: unique symbol;
export class DenoBlob implements domTypes.Blob {
private readonly [bytesSymbol];
kitsonk / webpack.config.ts
Created Jul 14, 2017
Making Page Bundles for Electron
View webpack.config.ts
import * as webpack from 'webpack';
import { resolve } from 'path';
import { existsSync } from 'fs';
const NormalModuleReplacementPlugin: any = require('webpack/lib/NormalModuleReplacementPlugin');
export = function webpackConfig(): webpack.Configuration {
return {
entry: {
index: './lib/pages/index.js',
kitsonk / project.json
Created Jun 23, 2017
Dojo 2 Todo MVC TSX
View project.json
This file has been truncated, but you can view the full file.
kitsonk /
Last active Aug 8, 2017
Working with Intern 3 from vscode

Work with Intern from vscode

This document provides an example of how you can configure vscode to test with Intern.

You will need to edit your .vscode/launch.json in the root of your project and follow the example JSON below.

This will provide two "tasks", both being the unit tests, in Node.js and Chrome. The latter needs the Chrome Debugger plugin installed in vscode. You need to tailor the below to match you environment and assumes that intern is installed in the root of node_modules and that you are serving your project root up at localhost:8080.

kitsonk / project.json
Created Apr 29, 2017
Dojo 2 Hello World
View project.json
This file has been truncated, but you can view the full file.
kitsonk /
Last active Apr 27, 2017
VSCode running Unit Tests under Node

Configuring VSCode to Run Dojo 2 Unit Test

The launch.json can be added to .vscode directory of your project.

This is for most @dojo/* packages that use grunt-dojo2. A different configuration would be required for applications created with dojo create app.