Skip to content

Commit

Permalink
Clean up comments and logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Wilcox committed Jul 3, 2012
1 parent 68ba010 commit 66b2dc9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 24 deletions.
21 changes: 9 additions & 12 deletions all.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
define([

'./shim',
'./dom',
'./fx',
'./groups',
'./has',
'./lang',
'./log',
'./mouse',
'./on',
'./string',
'./fx',
'./topic'
], function(){

var dj = require.argsToObject('dx-alias/all');
// './parser!', // plugin. Pull this in on your own.
// './ani', //under development
// './Widget', //if you use Widget, pull it in specifically.

var log = dj.log('ALL', 1);
], function(){ // look ma! No args!

//log('test dom:', dj.dom);
log('test lang:', dj.lang);
log('test mouse:', dj.mouse);
//log('test on:', dj.on);
log('test string:', dj.string);
log('test fx:', dj.fx);
log('test topic:', dj.topic);
return require.argsToObject('dx-alias/all');

return dj;
});
16 changes: 5 additions & 11 deletions parser.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
define([
'dojo/parser',
//'dojo/promise/instrumenting!report-unhandled-errors',
'dojo/promise/instrumenting!report-unhandled-rejections',
//'dojo/promise/instrumenting!report-rejections',
'dojo/domReady!'
Expand All @@ -9,36 +8,31 @@ define([
var complete = 0;
var callback;

console.log('dx-alias/parser');

parser.parse().then(
function(){
console.log('completed parsing')
//console.log('completed parsing')
complete = 1;
if(!!callback) callback();
},
function(err){
// console.error('parse error:', err);
// should be caught.
// console.error('parse error:', err);
})

return {

load: function(id, req, cb){
if(complete){
console.log('already completed parsing')
//console.log('already completed parsing')
setTimeout(cb, 1);
//cb();
}else{
callback = function(){
setTimeout(cb, 1);
//cb();
};
}
//return 0;

},
parse: function(){

console.error('You do not have to call parse() on this AMD plugin.');
}
}
});
2 changes: 1 addition & 1 deletion shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ define(function(){
var module = require.modules[mid];
var name;
var args = {};
console.dir(module.deps);
//console.dir(module.deps);
for(var i=0; i<module.deps.length; i++){
var m = module.deps[i].mid;
name = m.substring(m.lastIndexOf('/')+1, m.length);
Expand Down

0 comments on commit 66b2dc9

Please sign in to comment.