浏览代码

Remove interpolation markup from yeoman

JC Brand 7 年之前
父节点
当前提交
79fd27ce58
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      docs/source/plugin_development.rst

+ 5 - 5
docs/source/plugin_development.rst

@@ -130,7 +130,7 @@ Here's an example of the plugin shown above wrapped inside a UMD module:
     (function (root, factory) {
         if (typeof define === 'function' && define.amd) {
             // AMD. Register as a module called "myplugin"
-            define("myplugin", ["converse"], factory);
+            define(["converse"], factory);
         } else {
             // Browser globals. If you're not using a module loader such as require.js,
             // then this line below executes. Make sure that your plugin's <script> tag
@@ -346,7 +346,7 @@ generated by `generator-conversejs <https://github.com/jcbrand/generator-convers
     (function (root, factory) {
         if (typeof define === 'function' && define.amd) {
             // AMD. Register as a module called "myplugin"
-            define("<%= name %>", ["converse"], factory);
+            define(["converse"], factory);
         } else {
             // Browser globals. If you're not using a module loader such as require.js,
             // then this line below executes. Make sure that your plugin's <script> tag
@@ -368,7 +368,7 @@ generated by `generator-conversejs <https://github.com/jcbrand/generator-convers
             moment = converse.env.moment;
 
         // The following line registers your plugin.
-        converse.plugins.add("<%= name %>", {
+        converse.plugins.add("myplugin", {
 
             /* Optional dependencies are other plugins which might be
                * overridden or relied upon, and therefore need to be loaded before
@@ -393,7 +393,7 @@ generated by `generator-conversejs <https://github.com/jcbrand/generator-convers
                  * `_converse` object.
                  */
                 var _converse = this._converse;
-                _converse.log("The <%= name %> plugin is being initialized");
+                _converse.log("The \"myplugin\" plugin is being initialized");
 
                 /* From the `_converse` object you can get any configuration
                  * options that the user might have passed in via
@@ -405,7 +405,7 @@ generated by `generator-conversejs <https://github.com/jcbrand/generator-convers
                  * configuration settings. This is done like so:
                 */
                 _converse.api.settings.update({
-                    'initialize_message': 'Initializing <%= name %>!'
+                    'initialize_message': 'Initializing myplugin!'
                 });
 
                 /* The user can then pass in values for the configuration