Skip to content

Commit a7c7fe4

Browse files
committed
Working on getting Browserify 'require()' calls in place (doesn't work yet)
1 parent 4acbfe2 commit a7c7fe4

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

Jakefile.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
}, {async: true});
7272

7373
desc("Test client code");
74-
task("testClient", function() {
74+
task("testClient", ["build"], function() {
7575
karma.runTests(SUPPORTED_BROWSERS, complete, fail);
7676
}, {async: true});
7777

@@ -204,8 +204,12 @@
204204
function clientGlobals() {
205205
return {
206206
wwp: true,
207+
208+
// Browserify
207209
module: false,
210+
require: false,
208211

212+
// Mocha / expect.js
209213
describe: false,
210214
it: false,
211215
expect: false,

src/client/client.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ window.wwp = window.wwp || {};
66
(function() {
77
"use strict";
88

9+
var SvgCanvas = require("./svg_canvas.js");
10+
911
var svgCanvas = null;
1012
var start = null;
1113
var drawingArea;

src/client/svg_canvas.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.
22
/*global Raphael */
33

4-
window.wwp = window.wwp || {};
5-
64
(function() {
75
"use strict";
86

@@ -86,6 +84,6 @@ window.wwp = window.wwp || {};
8684
];
8785
}
8886

89-
// module.exports = SvgCanvas;
87+
module.exports = SvgCanvas;
9088

9189
}());

todo.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ To Do on current task:
2727
- What about deployment? (Punt?)
2828
- Duplication between weewikipaint.js CONTENT_DIR and our Jakefile
2929
- Do we want to copy src/server/ files to build directory?
30+
- Fix Karma error messages using source maps
3031

3132

3233
Future ideas:

0 commit comments

Comments
 (0)