]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
add a dojo build profile
authorDustin J. Mitchell <dustin@mozilla.com>
Sun, 25 Nov 2012 20:54:56 +0000 (15:54 -0500)
committerDustin J. Mitchell <dustin@mozilla.com>
Mon, 26 Nov 2012 00:38:56 +0000 (19:38 -0500)
This only tells Dojo about moment.js and lang/*.js.

moment.js
package.js [new file with mode: 0644]
package.json

index 12ae51f485870f504f36980ccc5e3940bb7168e1..c7a71685b935e0d825854422d73af51fef435476 100644 (file)
--- a/moment.js
+++ b/moment.js
     }
     /*global define:false */
     if (typeof define === "function" && define.amd) {
-        define("moment", [], function () {
+        define(function () {
             return moment;
         });
     }
diff --git a/package.js b/package.js
new file mode 100644 (file)
index 0000000..aba8d50
--- /dev/null
@@ -0,0 +1,11 @@
+var profile = {
+    resourceTags: {
+        ignore: function(filename, mid){
+            // only include moment/moment
+            return mid != "moment/moment";
+        },
+        amd: function(filename, mid){
+            return /\.js$/.test(filename);
+        }
+    }
+};
index 1ab7ebe6b3e241d03c7c831d33fca292745ffad8..74c95f2c272b5b349162b9aa3bee65db7252fd6d 100755 (executable)
@@ -42,5 +42,6 @@
     "scripts": {
         "test": "grunt"
     },
-    "ender": "./ender.js"
+    "ender": "./ender.js",
+    "dojoBuild": "package.js"
 }