Skip to content

Instantly share code, notes, and snippets.

View kitsonk's full-sized avatar
🔨
Nailing It!

Kitson Kelly kitsonk

🔨
Nailing It!
View GitHub Profile
@kitsonk
kitsonk / README.md
Last active April 27, 2017 10:12
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.

@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,700');
.basic {
font-family: 'Open Sans', sans-serif;
font-size: 14px;
}
.visually-hidden {
border: 0;
clip: rect(0 0 0 0);
import createApp from 'dojo-app/createApp';
import createStatefulChildrenMixin from 'dojo-widgets/mixins/createStatefulChildrenMixin';
import createParentListMixin from 'dojo-widgets/mixins/createParentListMixin';
import createCachedRenderMixin from 'dojo-widgets/mixins/createCachedRenderMixin';
import createRenderableChildrenMixin from 'dojo-widgets/mixins/createRenderableChildrenMixin';
import createWidget from 'dojo-widgets/createWidget';
import createMemoryStore from 'dojo-widgets/util/createMemoryStore';
const widgetStore = createMemoryStore({
data: [
@kitsonk
kitsonk / composeAspectTestCase.js
Last active July 5, 2016 14:05 — forked from agubler/composeAspectTestCase.js
Compose Aspect Test Case
'base, initialize, and aspect, twice': function() {
let val = 0;
const stack = [];
const createBase = compose({})
.mixin({
mixin: {
foo: 0,
doFoo: () => {
val++;
stack.push('createBase');
{
"name": "core",
"version": "0.0.5",
"devDependencies": {
"intern": "^2.2.0",
"grunt": "^0.4.5",
"http-proxy": "^0.10.4",
"glob": "^3.2.11",
"jsgi-node": "^0.3.1",
"formidable": "^1.0.15",
{
events: [{
type: on.delegate('.something', 'click'),
listener: fn
}, {
type: 'click',
listener: fn
}]
}
@kitsonk
kitsonk / gist:5942517
Created July 7, 2013 06:17
Syntax Checking Expression
/** This expression checking syntax is not currently part of MDV, which pidgin/tmpl is built upon, and so it is
* used here as a custom syntax. It is very handy and might be incorporated directly into pidgin in the
* future.
*/
/**
* Matches a string that is enclosed within parens `(...)`
* @type {RegExp}
*/
var expressionRE = /^\(([^\)]*)\)$/;
@kitsonk
kitsonk / dgridLocalStorage.html
Last active December 15, 2015 11:39
An example of dgrid working with hokan/IndexedDB
<!DOCTYPE html>
<html>
<head>
<title>Testing Widgets</title>
<style type="text/css">
@import "../dojo/resources/dojo.css";
@import "../dgrid/css/dgrid.css";
@import "../dgrid/css/skins/claro.css";
body {