@@ -187,24 +187,27 @@ module.exports = function(grunt) {
187
187
}
188
188
189
189
// Start to wrap file with AMD
190
- if ( options . amd ) {
191
- // addd AMD name string from options.amdDefinitionName
192
- var amdNameString = "" ;
190
+ if ( options . amd ) {
191
+
192
+ // add AMD name string from options.amdDefinitionName
193
+ var amdNameString = '' ;
193
194
194
195
// Verify if it was set a name to define method and its a string
195
- if ( options . amdDefinitionName && typeof options . amdDefinitionName === 'string' ) {
196
- amdNameString = '\'' + options . amdDefinitionName + '\',' ;
197
- } else {
198
- amdNameString = '' ;
199
- }
196
+ if ( options . amdDefinitionName && typeof options . amdDefinitionName === 'string' ) {
197
+ amdNameString = '\'' + options . amdDefinitionName + '\',' ;
198
+ } else {
199
+ amdNameString = '' ;
200
+ }
200
201
201
202
// Wrap the file in an AMD define fn.
202
203
if ( typeof options . amd === 'boolean' ) {
203
- output . unshift ( 'define(' + amdNameString + '[\'handlebars\'], function(Handlebars) {' ) ;
204
+ output . unshift ( 'define(' + amdNameString + '[\'handlebars\'], function(Handlebars) {' ) ;
204
205
} else if ( typeof options . amd === 'string' ) {
205
- output . unshift ( 'define(' + amdNameString + '[\'' + options . amd + '\'], function(Handlebars) {' ) ;
206
+ output . unshift ( 'define(' + amdNameString + '[\'' + options . amd + '\'], function(Handlebars) {' ) ;
206
207
} else if ( typeof options . amd === 'function' ) {
207
- output . unshift ( 'define(' + amdNameString + '[\'' + options . amd ( filename , ast , compiled ) + '\'], function(Handlebars) {' ) ;
208
+ //jscs:disable maximumLineLength
209
+ output . unshift ( 'define(' + amdNameString + '[\'' + options . amd ( filename , ast , compiled ) + '\'], function(Handlebars) {' ) ;
210
+ //jscs:enable maximumLineLength
208
211
} else if ( Array . isArray ( options . amd ) ) {
209
212
// convert options.amd to a string of dependencies for require([...])
210
213
var amdString = '' ;
@@ -217,7 +220,7 @@ module.exports = function(grunt) {
217
220
}
218
221
219
222
// Wrap the file in an AMD define fn.
220
- output . unshift ( 'define(' + amdNameString + '[' + amdString + '], function(Handlebars) {' ) ;
223
+ output . unshift ( 'define(' + amdNameString + '[' + amdString + '], function(Handlebars) {' ) ;
221
224
}
222
225
223
226
if ( useNamespace ) {
@@ -227,7 +230,6 @@ module.exports = function(grunt) {
227
230
}
228
231
output . push ( '});' ) ;
229
232
}
230
- // End of AMD
231
233
232
234
if ( options . commonjs ) {
233
235
if ( useNamespace ) {
0 commit comments