tasks/lib/helpers.js
function(pagedef, pagedir){
		var filenameBase = pagedir + pagedef.uniqueId;
		var xmlDef = {ext: '.xml', contents: pd.xml(pagedef.body)};
		var metaDef = {
			ext: '.json',
			contents: JSON.stringify(_.omit(pagedef, 'body'), null, 3)
		};
		_.each([xmlDef, metaDef], function(item){
			var filename = filenameBase + item.ext;
			grunt.file.write(filenameBase + item.ext, item.contents);
			if(grunt.option('verbose')){
				grunt.log.ok(filename + ' written to ' + pagedir);
			}
		});
	}
function(pagedef, pagedir){
		var filenameBase = pagedir + pagedef.uniqueId;
		var xmlDef = {ext: '.xml', contents: pd.xml(pagedef.body)};
		var metaDef = {
			ext: '.json',
			contents: JSON.stringify(_.omit(pagedef, 'body'), null, 3)
		};
		_.each([xmlDef, metaDef], function(item){
			var filename = filenameBase + item.ext;
			grunt.file.write(filenameBase + item.ext, item.contents);
			if(grunt.option('verbose')){
				grunt.log.ok(filename + ' written to ' + pagedir);
			}
		});
	}
function ( pagedef , pagedir ) { var filenameBase = pagedir + pagedef . uniqueId ; var xmlDef = { ext : '.xml' , contents : pd . xml ( pagedef . body ) } ; var metaDef = { ext : '.json' , contents : JSON . stringify ( _ . omit ( pagedef , 'body' ) , null , 3 ) } ; _ . each ( [ xmlDef , metaDef ] , function ( item ) { var filename = filenameBase + item . ext ; grunt . file . write ( filenameBase + item . ext , item . contents ) ; if ( grunt . option ( 'verbose' ) ) { grunt . log . ok ( filename + ' written to ' + pagedir ) ; } } ) ; }
Prepare the xml and json meta files for the specified Skuid page
@param  {[type]} pagedef [description]
@param  {[type]} pagedir [description]
@return {[type]}         [description]
Prepare the xml and json meta files for the specified Skuid page