Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
add documentation for sourceMapDir option. [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyfreeman authored and Tyler Kellen committed Dec 24, 2013
1 parent 8a69fea commit b2464f1
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 7 deletions.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -91,19 +98,31 @@ 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,
cwd: 'path/to',
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
Expand All @@ -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.*
15 changes: 13 additions & 2 deletions docs/coffee-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,26 @@ 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,
cwd: 'path/to',
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).
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).
8 changes: 7 additions & 1 deletion docs/coffee-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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.

0 comments on commit b2464f1

Please sign in to comment.