Replaced amdWrapper by amd

format
Adrien Antoine 12 years ago
parent efee77f83c
commit 30685afc19

@ -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/)

@ -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: {

@ -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;

Loading…
Cancel
Save