grunt-contrib-coffee
Advanced tools
Comparing version 0.11.0 to 0.11.1
{ | ||
"name": "grunt-contrib-coffee", | ||
"description": "Compile CoffeeScript files to JavaScript.", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"homepage": "https://github.com/gruntjs/grunt-contrib-coffee", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -1,2 +0,2 @@ | ||
# grunt-contrib-coffee v0.11.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-coffee.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-coffee) | ||
# grunt-contrib-coffee v0.11.1 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-coffee.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-coffee) | ||
@@ -134,2 +134,3 @@ > Compile CoffeeScript files to JavaScript. | ||
* 2014-08-15 v0.11.1 Fixes summary logging. | ||
* 2014-08-06 v0.11.0 Adds summary containing number of files created. Move file creation logging to grunt.verbose. Updates Chalk to 0.5. | ||
@@ -164,2 +165,2 @@ * 2014-02-07 v0.10.0 SourceMappingURL calculated correctly | ||
*This file was generated on Wed Aug 06 2014 15:34:17.* | ||
*This file was generated on Fri Aug 15 2014 11:06:42.* |
@@ -16,7 +16,2 @@ /* | ||
var actionCounts = { | ||
fileCreated: 0, | ||
mapCreated: 0 | ||
}; | ||
grunt.registerMultiTask('coffee', 'Compile CoffeeScript files into JavaScript', function() { | ||
@@ -30,2 +25,6 @@ var options = this.options({ | ||
}); | ||
var actionCounts = { | ||
createdFile: 0, | ||
createdMap: 0 | ||
}; | ||
@@ -41,19 +40,20 @@ options.separator = grunt.util.normalizelf(options.separator); | ||
var fileOptions = _.extend({ sourceMapDir: paths.destDir }, options); | ||
writeFileAndMap(paths, compileWithMaps(validFiles, fileOptions, paths), fileOptions); | ||
var writeResult = writeFileAndMap(paths, compileWithMaps(validFiles, fileOptions, paths), fileOptions); | ||
actionCounts.createdFile += writeResult.createdFile; | ||
actionCounts.createdMap += writeResult.createdMap; | ||
} else if (options.join === true) { | ||
writeCompiledFile(f.dest, concatInput(validFiles, options)); | ||
actionCounts.createdFile += writeCompiledFile(f.dest, concatInput(validFiles, options)); | ||
} else { | ||
writeCompiledFile(f.dest, concatOutput(validFiles, options)); | ||
actionCounts.createdFile += writeCompiledFile(f.dest, concatOutput(validFiles, options)); | ||
} | ||
}); | ||
grunt.log.ok(actionCounts.fileCreated + ' files created.'); | ||
if (actionCounts.mapCreated > 0) { | ||
grunt.log.ok(actionCounts.mapCreated + ' source map files created.'); | ||
grunt.log.ok(actionCounts.createdFile + ' files created.'); | ||
if (actionCounts.createdMap > 0) { | ||
grunt.log.ok(actionCounts.createdMap + ' source map files created.'); | ||
} | ||
}); | ||
var isLiterate = function(ext) { | ||
return (ext === ".litcoffee" || ext === ".md"); | ||
return (ext === '.litcoffee' || ext === '.md'); | ||
}; | ||
@@ -225,5 +225,10 @@ | ||
writeCompiledFile(paths.dest, output.js); | ||
var createdFile = writeCompiledFile(paths.dest, output.js); | ||
options.sourceMapDir = appendTrailingSlash(options.sourceMapDir); | ||
writeSourceMapFile(options.sourceMapDir + paths.mapFileName, output.v3SourceMap); | ||
var createdMap = writeSourceMapFile(options.sourceMapDir + paths.mapFileName, output.v3SourceMap); | ||
return { | ||
createdFile: createdFile, | ||
createdMap: createdMap | ||
}; | ||
}; | ||
@@ -247,4 +252,6 @@ | ||
if (writeFile(path, output)) { | ||
actionCounts.fileCreated++; | ||
grunt.verbose.writeln('File ' + chalk.cyan(path) + ' created.'); | ||
return 1; | ||
} else { | ||
return 0; | ||
} | ||
@@ -254,6 +261,8 @@ }; | ||
if (writeFile(path, output)) { | ||
actionCounts.mapCreated++; | ||
grunt.verbose.writeln('File ' + chalk.cyan(path) + ' created (source map).'); | ||
return 1; | ||
} else { | ||
return 0; | ||
} | ||
}; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17021
227
165