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
.
<!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 { |
/** 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 = /^\(([^\)]*)\)$/; |
{ | |
events: [{ | |
type: on.delegate('.something', 'click'), | |
listener: fn | |
}, { | |
type: 'click', | |
listener: fn | |
}] | |
} |
{ | |
"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", |
'base, initialize, and aspect, twice': function() { | |
let val = 0; | |
const stack = []; | |
const createBase = compose({}) | |
.mixin({ | |
mixin: { | |
foo: 0, | |
doFoo: () => { | |
val++; | |
stack.push('createBase'); |
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: [ |
@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); |
{"dependencies":{"production":{"@dojo/core":"2.0.0-alpha.25","@dojo/has":"beta1","@dojo/routing":"2.0.0-alpha.10","@dojo/shim":"beta1","@dojo/stores":"2.0.0-alpha.11","@dojo/widget-core":"2.0.0-alpha.27","@dojo/i18n":"2.0.0-alpha.7","maquette":"2.4.3"},"development":{"@dojo/cli-build-webpack":"^2.0.0-alpha.11","@dojo/cli-test-intern":"^2.0.0-alpha.2","@dojo/interfaces":"2.0.0-alpha.11","@dojo/loader":"2.0.0-beta.9","@types/chai":"3.4.34","@types/glob":"~5.0.0","@types/grunt":"~0.4.0","@types/node":"6.0.48","chai":"3.5.0","intern":"~3.4.1","typescript":"~2.2.1","@types/minimatch":"*","assertion-error":"^1.0.1","deep-eql":"^0.1.3","type-detect":"0.1.1","benchmark":"2.1.1","charm":"0.2.0","diff":"1.1.0","digdug":"~1.6.0","dojo":"2.0.0-alpha.7","glob":"^5.0.3","istanbul":"0.4.1","leadfoot":"~1.7.0","lodash-amd":"4.16.4","mimetype":"0.0.8","platform":"^1.3.1","source-map":"~0.5.1","lodash":"^4.14.0","decompress":"3.0.0","fs.realpath":"^1.0.0","inflight":"^1.0.4","inherits":"^2.0.1","minimatch":"^3.0.2","once":"^1. |
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
.