making it work for one file

master
Matt Huntington 10 years ago
parent fccbe8b1d7
commit b9feb35753

@ -2,13 +2,11 @@ module.exports = function(grunt) {
grunt.registerMultiTask('cml', 'Grunt task for converting CML to HTML', function() { grunt.registerMultiTask('cml', 'Grunt task for converting CML to HTML', function() {
var cml_html_converter = require('cml-html-converter'); var cml_html_converter = require('cml-html-converter');
var result = cml_html_converter('line1\n\tline2');
console.log(result);
/*
// Merge task-specific and/or target-specific options with these defaults. // Merge task-specific and/or target-specific options with these defaults.
var options = this.options({ var options = this.options({
punctuation: '.', punctuation: '',
separator: ', ' separator: ''
}); });
// Iterate over all specified file groups. // Iterate over all specified file groups.
@ -24,7 +22,7 @@ module.exports = function(grunt) {
} }
}).map(function(filepath) { }).map(function(filepath) {
// Read file source. // Read file source.
return grunt.file.read(filepath); return cml_html_converter(grunt.file.read(filepath));
}).join(grunt.util.normalizelf(options.separator)); }).join(grunt.util.normalizelf(options.separator));
// Handle options. // Handle options.
@ -36,7 +34,7 @@ module.exports = function(grunt) {
// Print a success message. // Print a success message.
grunt.log.writeln('File "' + f.dest + '" created.'); grunt.log.writeln('File "' + f.dest + '" created.');
}); });
*/
}); });
}; };

Loading…
Cancel
Save