You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/plugins.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -227,7 +227,7 @@ <h3>
227
227
<ul>
228
228
<li><b>pluginName</b>: String. The <b>normalized</b> name for the plugin. Most plugins will not be authored with a name (they will be anonymous plugins) so it is useful to know the normalized name for the plugin module for use in the optimized file.</li>
229
229
<li><b>name</b>: String. The <b>normalized</b> resource name.</li>
230
-
<li><b>write</b>: Function. A function to be called with a string of output to write to the optimized file.</li>
230
+
<li><b>write</b>: Function. A function to be called with a string of output to write to the optimized file. This function also contains a property function, <b>write.asModule(moduleName, text)</b>. asModule can be used to write out a module that may have an anonymous define call in there that needs name insertion or/and contains implicit require("") dependencies that need to be pulled out for the optimized file. asModule is useful for text transform plugins, like a CoffeeScript plugin.</li>
231
231
</ul>
232
232
233
233
<p>The text! plugin implements write, to write out a string value for the text file that it loaded. A snippet from that file:</p>
0 commit comments