handlebars-maven-plugin/src/main/java/com/github/jknack/handlebars/maven/I18nJsPlugin.java
private String wrap(final String filename, final CharSequence body, final boolean amd) {
    if (amd) {
      return String.format("define('%s', ['i18n'], function (I18n) {\n%s});\n", filename, body);
    }
    return String.format("(function() {\n%s})();\n", body.toString());
  }
/**
   * Wrap javaScript code using an anonymous function or the AMD format.
   *
   * @param filename The javascript file name.
   * @param body The javascript code.
   * @param amd True, for AMD.
   * @return Some javascript code.
   */
Wrap javaScript code using an anonymous function or the AMD format.
@param filename The javascript file name.
@param body The javascript code.
@param amd True, for AMD.
@return Some javascript code.
Wrap javaScript code using an anonymous function or the AMD format . @param filename The javascript file name . @param body The javascript code . @param amd True for AMD . @return Some javascript code .
private String wrap(final String filename, final CharSequence body, final boolean amd) {
    if (amd) {
      return String.format("define('%s', ['i18n'], function (I18n) {\n%s});\n", filename, body);
    }
    return String.format("(function() {\n%s})();\n", body.toString());
  }
private String wrap ( final String filename , final CharSequence body , final boolean amd ) { if ( amd ) { return String . format ( "define('%s', ['i18n'], function (I18n) {\n%s});\n" , filename , body ) ; } return String . format ( "(function() {\n%s})();\n" , body . toString ( ) ) ; }
Wrap javaScript code using an anonymous function or the AMD format.
Wrap javaScript code using an anonymous function or the AMD format .