From 60725bac19bdb47635831f0acf748b3ada5d8947 Mon Sep 17 00:00:00 2001 From: Bryan Forbes Date: Thu, 22 Dec 2011 16:40:01 -0600 Subject: [PATCH 1/2] Added a Dojo build profile to properly tag the module as AMD. --- aop.profile.js | 20 ++++++++++++++++++++ package.json | 5 +++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 aop.profile.js diff --git a/aop.profile.js b/aop.profile.js new file mode 100644 index 0000000..b186a6f --- /dev/null +++ b/aop.profile.js @@ -0,0 +1,20 @@ +var profile = (function(){ + var testRE = /^aop\/test\//; + return { + resourceTags: { + test: function(filename, mid){ + // Tag test files as such + return testRE.test(mid); + }, + amd: function(filename, mid){ + // Tag the module as AMD so it doesn't get + // wrapped by the Dojo builder + return mid == "aop/aop"; + }, + copyOnly: function(filename, mid){ + // Don't process package.json + return mid == "aop/package.json"; + } + } + }; +})(); diff --git a/package.json b/package.json index 4a90204..19af8c4 100644 --- a/package.json +++ b/package.json @@ -31,5 +31,6 @@ "main": "./aop", "directories": { "test": "test" - } -} \ No newline at end of file + }, + "dojoBuild": "aop.profile.js" +} From 34eb114bc31c05b60b5b291a7e1f8f7080e3c422 Mon Sep 17 00:00:00 2001 From: Bryan Forbes Date: Fri, 23 Dec 2011 11:30:16 -0600 Subject: [PATCH 2/2] Fix tabs and spaces. --- aop.profile.js | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/aop.profile.js b/aop.profile.js index b186a6f..2d1e7a0 100644 --- a/aop.profile.js +++ b/aop.profile.js @@ -2,19 +2,19 @@ var profile = (function(){ var testRE = /^aop\/test\//; return { resourceTags: { - test: function(filename, mid){ + test: function(filename, mid){ // Tag test files as such - return testRE.test(mid); - }, - amd: function(filename, mid){ + return testRE.test(mid); + }, + amd: function(filename, mid){ // Tag the module as AMD so it doesn't get // wrapped by the Dojo builder - return mid == "aop/aop"; - }, - copyOnly: function(filename, mid){ + return mid == "aop/aop"; + }, + copyOnly: function(filename, mid){ // Don't process package.json - return mid == "aop/package.json"; - } + return mid == "aop/package.json"; + } } }; })(); diff --git a/package.json b/package.json index 19af8c4..3b79ccd 100644 --- a/package.json +++ b/package.json @@ -32,5 +32,5 @@ "directories": { "test": "test" }, - "dojoBuild": "aop.profile.js" + "dojoBuild": "aop.profile.js" }