Replaced amdWrapper by amd

This commit is contained in:
Adrien Antoine 2013-03-06 17:09:18 +00:00
parent efee77f83c
commit 30685afc19
3 changed files with 7 additions and 6 deletions

View File

@ -2,3 +2,4 @@ Tim Branyen (http://tbranyen.com)
Tyler Kellen (http://goingslowly.com/) Tyler Kellen (http://goingslowly.com/)
Chris Talkington (http://christalkington.com/) Chris Talkington (http://christalkington.com/)
Larry Davis (http://lazd.net/) Larry Davis (http://lazd.net/)
Adrien Antoine (http://adriantoine.com/)

View File

@ -46,7 +46,7 @@ module.exports = function(grunt) {
variable: 'obj' variable: 'obj'
}, },
prettify: true, prettify: true,
amdWrapper: true amd: true
}, },
files: { files: {
"tmp/pretty_amd.js": ["test/fixtures/template.html"] "tmp/pretty_amd.js": ["test/fixtures/template.html"]
@ -68,7 +68,7 @@ module.exports = function(grunt) {
templateSettings: { templateSettings: {
variable: 'obj' variable: 'obj'
}, },
amdWrapper:true amd:true
}, },
files: { files: {
"tmp/amd_wrapper.js": ["test/fixtures/template.html"] "tmp/amd_wrapper.js": ["test/fixtures/template.html"]
@ -79,7 +79,7 @@ module.exports = function(grunt) {
templateSettings: { templateSettings: {
variable: 'obj' variable: 'obj'
}, },
amdWrapper:true, amd:true,
namespace:false namespace:false
}, },
files: { files: {

View File

@ -61,7 +61,7 @@ module.exports = function(grunt) {
} }
filename = processName(filepath); filename = processName(filepath);
if (options.amdWrapper && options.namespace === false) { if (options.amd && options.namespace === false) {
return 'return ' + compiled; return 'return ' + compiled;
} }
return nsInfo.namespace+'['+JSON.stringify(filename)+'] = '+compiled+';'; return nsInfo.namespace+'['+JSON.stringify(filename)+'] = '+compiled+';';
@ -73,7 +73,7 @@ module.exports = function(grunt) {
if (options.namespace !== false) { if (options.namespace !== false) {
output.unshift(nsInfo.declaration); output.unshift(nsInfo.declaration);
} }
if (options.amdWrapper) { if (options.amd) {
if (options.prettify) { if (options.prettify) {
output.forEach(function(line, index) { output.forEach(function(line, index) {
output[index] = " " + line; output[index] = " " + line;