tasks/guibundles.js
function writefile(filepath, filetext, options) {
		var version = '-1.0.0';
		var packag = filename('package.json', options);
		var banner = filename('BANNER.txt', options);
		if (grunt.file.exists(banner)) {
			filetext = grunt.file.read(banner) + '\n' + filetext;
		}
		if (grunt.file.exists(packag)) {
			var json = grunt.file.readJSON(packag);
			version = json.version;
		}
		grunt.file.write(
			filepath,
			grunt.template.process(filetext, {
				data: {
					version: version
				}
			})
		);
		grunt.log.writeln('File "' + chalk.cyan(filepath) + '" created.');
	}
function writefile(filepath, filetext, options) {
		var version = '-1.0.0';
		var packag = filename('package.json', options);
		var banner = filename('BANNER.txt', options);
		if (grunt.file.exists(banner)) {
			filetext = grunt.file.read(banner) + '\n' + filetext;
		}
		if (grunt.file.exists(packag)) {
			var json = grunt.file.readJSON(packag);
			version = json.version;
		}
		grunt.file.write(
			filepath,
			grunt.template.process(filetext, {
				data: {
					version: version
				}
			})
		);
		grunt.log.writeln('File "' + chalk.cyan(filepath) + '" created.');
	}
function writefile ( filepath , filetext , options ) { var version = '-1.0.0' ; var packag = filename ( 'package.json' , options ) ; var banner = filename ( 'BANNER.txt' , options ) ; if ( grunt . file . exists ( banner ) ) { filetext = grunt . file . read ( banner ) + '\n' + filetext ; } if ( grunt . file . exists ( packag ) ) { var json = grunt . file . readJSON ( packag ) ; version = json . version ; } grunt . file . write ( filepath , grunt . template . process ( filetext , { data : { version : version } } ) ) ; grunt . log . writeln ( 'File "' + chalk . cyan ( filepath ) + '" created.' ) ; }
Write file and report to console.
@param {String} filepath
@param {String} filetext
Write file and report to console .