Skip to content

Instantly share code, notes, and snippets.

View bryanforbes's full-sized avatar

Bryan Forbes bryanforbes

View GitHub Profile
module.exports = function (grunt) {
grunt.loadNpmTasks('intern-geezer');
var req = (function () {
this.dojoConfig = {
async: true,
baseUrl: __dirname,
packages: [
{ name: 'intern', location: 'node_modules/intern-geezer' },
{ name: 'when', location: 'node_modules/when', main: 'when' },
define([
'./_base',
'./AdapterRegistry',
'./colors',
'./io-query',
'./promise',
'./request',
'./store',
'./string',
'./regexp',
define([
'intern!object',
'intern/chai!assert'
], function (registerSuite, assert) {
var one = 0;
registerSuite({
// If this test were to run more than once (which functional
// tests do), it would fail because it is keeping its state
// in the module's closure
{
"requireCurlyBraces": [
"if", "else", "for", "while", "do", "try",
"catch"
],
"requireSpaceAfterKeywords": [
"if", "else", "for", "while", "do", "switch",
"return", "try", "catch"
],
"requireSpaceBeforeBlockStatements": true,
define([
'intern!object',
'intern/chai!expect',
'sinon',
'when',
'intern/chai!',
'sinon-chai'
], function (registerSuite, expect, sinon, promise, chai, sinonChai) {
// add sinon assertions to chai
chai.use(sinonChai);
"use strict"
module.exports = (grunt) ->
require("matchdep").filterAll("grunt-*").forEach grunt.loadNpmTasks
grunt.initConfig
bower:
install:
@bryanforbes
bryanforbes / Application.js
Created September 13, 2013 17:28
Store-backed widget example
// my/Application.js
define([
'dojo/store/JsonRest',
'./Widget',
'dojo/domReady!'
], function (JsonRest, Widget) {
return {
initialize: function () {
var store = new JsonRest({ target: '/target/' }),
ui = new Widget({
define([
'dojo/declare',
'dojo/promise/when'
], function (declare, when) {
var slice = [].slice,
nop = function () {};
function createNotifier(object) {
var listenerMap = {},
objectListeners = [];
var dojoConfig = {
asyc: true,
baseUrl: 'path/to/src',
tlmSiblingOfDojo: false,
packages: [
'dojo',
'dijit',
'dojox',
{ name: 'doh', location: 'util/doh' }
]
# Set the default behavior, in case users don't have core.autocrlf set
* text=auto
# Files that should always be normalized and converted to native line
# endings on checkout.
*.js text
*.json text
*.htm text
*.html text
*.svg text