--- /dev/null
+/*\r
+ Copyright 2013 Daniel Wirtz <dcode@dcode.io>\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+ */\r
+var description = "Runtime structures as AMD module";\r
+\r
+var ProtoBuf = require("../../../index.js"),\r
+ util = require("../util.js"),\r
+ js = require("./js.js");\r
+\r
+/**\r
+ * pbjs target: Runtime structures as an AMD module\r
+ * @exports pbjs/targets/amd\r
+ * @function\r
+ * @param {!ProtoBuf.Builder} builder Builder\r
+ * @param {!Object.<string,*>=} options Options\r
+ * @returns {string}\r
+ */\r
+var amd = module.exports = function(builder, options) {\r
+ options = options || {};\r
+ return [\r
+ "define([", JSON.stringify(options.dependency || "protobuf"), "]", options.min ? "," : ", ",\r
+ "function(ProtoBuf)", options.min ? "{" : " {\n ",\r
+ "return ProtoBuf",\r
+ util.indent(js.build(builder, options), options.min ? "" : " "), options.min ? "" : "\n",\r
+ "});"\r
+ ].join('');\r
+};\r
+\r
+/**\r
+ * Module description.\r
+ * @type {string}\r
+ */\r
+amd.description = description;\r