From b2464f12bd7832eb406cefa66ad04914a24e09fb Mon Sep 17 00:00:00 2001 From: Johnny Freeman Date: Fri, 20 Dec 2013 13:45:16 -0500 Subject: [PATCH] add documentation for sourceMapDir option. [ci skip] --- README.md | 27 +++++++++++++++++++++++---- docs/coffee-examples.md | 15 +++++++++++++-- docs/coffee-options.md | 8 +++++++- 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3364521..fe5f36a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# grunt-contrib-coffee [![Build Status](https://secure.travis-ci.org/gruntjs/grunt-contrib-coffee.png?branch=master)](http://travis-ci.org/gruntjs/grunt-contrib-coffee) +# grunt-contrib-coffee v0.7.0 [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-coffee.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-coffee) > Compile CoffeeScript files to JavaScript. @@ -49,7 +49,14 @@ When compiling multiple .coffee files into a single .js file, concatenate first. Type: `boolean` Default: `false` -Compile JavaScript and create a .map file linking it to the CoffeeScript source. When compiling multiple .coffee files to a single .js file, concatenation occurs as though the 'join' option is enabled. The concatenated CoffeeScript is written into the output directory, and becomes the target for source mapping. +Compile JavaScript and create a .map file linking it to the CoffeeScript source. When compiling multiple .coffee files to a single .js file, concatenation occurs as though the 'join' option is enabled + +#### sourceMapDir +Type: `String` +Default: (same path as your compiled js files) + +Generated source map files will be created here. + ### Usage Examples ```js @@ -91,6 +98,16 @@ coffee: { } }, + compileWithMapsDir: { + options: { + sourceMap: true, + sourceMapDir: 'path/to/maps/' // source map files will be created here + }, + files: { + 'path/to/result.js': 'path/to/source.coffee' + } + } + glob_to_multiple: { expand: true, flatten: true, @@ -98,12 +115,14 @@ coffee: { src: ['*.coffee'], dest: 'path/to/dest/', ext: '.js' - } + }, + } ``` For more examples on how to use the `expand` API to manipulate the default dynamic path construction in the `glob_to_multiple` examples, see "Building the files object dynamically" in the grunt wiki entry [Configuring Tasks](http://gruntjs.com/configuring-tasks). + ## Release History * 2013-04-19   v0.7.0   Place Sourcemaps at bottom of file Change extension for Sourcemaps from .maps to .js.map @@ -129,4 +148,4 @@ For more examples on how to use the `expand` API to manipulate the default dynam Task submitted by [Eric Woroshow](http://ericw.ca/) -*This file was generated on Fri Apr 19 2013 09:49:08.* +*This file was generated on Tue Dec 24 2013 10:49:06.* diff --git a/docs/coffee-examples.md b/docs/coffee-examples.md index bb9ad75..fdff023 100644 --- a/docs/coffee-examples.md +++ b/docs/coffee-examples.md @@ -39,6 +39,16 @@ coffee: { } }, + compileWithMapsDir: { + options: { + sourceMap: true, + sourceMapDir: 'path/to/maps/' // source map files will be created here + }, + files: { + 'path/to/result.js': 'path/to/source.coffee' + } + } + glob_to_multiple: { expand: true, flatten: true, @@ -46,8 +56,9 @@ coffee: { src: ['*.coffee'], dest: 'path/to/dest/', ext: '.js' - } + }, + } ``` -For more examples on how to use the `expand` API to manipulate the default dynamic path construction in the `glob_to_multiple` examples, see "Building the files object dynamically" in the grunt wiki entry [Configuring Tasks](http://gruntjs.com/configuring-tasks). \ No newline at end of file +For more examples on how to use the `expand` API to manipulate the default dynamic path construction in the `glob_to_multiple` examples, see "Building the files object dynamically" in the grunt wiki entry [Configuring Tasks](http://gruntjs.com/configuring-tasks). diff --git a/docs/coffee-options.md b/docs/coffee-options.md index d79811b..1abf243 100644 --- a/docs/coffee-options.md +++ b/docs/coffee-options.md @@ -21,4 +21,10 @@ When compiling multiple .coffee files into a single .js file, concatenate first. Type: `boolean` Default: `false` -Compile JavaScript and create a .map file linking it to the CoffeeScript source. When compiling multiple .coffee files to a single .js file, concatenation occurs as though the 'join' option is enabled. The concatenated CoffeeScript is written into the output directory, and becomes the target for source mapping. \ No newline at end of file +Compile JavaScript and create a .map file linking it to the CoffeeScript source. When compiling multiple .coffee files to a single .js file, concatenation occurs as though the 'join' option is enabled + +## sourceMapDir +Type: `String` +Default: (same path as your compiled js files) + +Generated source map files will be created here.