diff --git a/Gruntfile.js b/Gruntfile.js
index e407a5c..d98404b 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -112,6 +112,13 @@ module.exports = function(grunt) {
}
}
},
+ customTempDir: {
+ src: 'test/fixtures/custom-temp-dir/src/**/*.js',
+ options: {
+ specs: 'test/fixtures/custom-temp-dir/spec/**/*.js',
+ tempDir: '.custom/'
+ }
+ },
selfTest: {
options: {
specs: ['test/selfTest/*.js'],
diff --git a/README.md b/README.md
index 676c5fb..a1f9bb6 100644
--- a/README.md
+++ b/README.md
@@ -87,6 +87,13 @@ This is the jasmine-version which will be used. currently available versions are
*Due to changes in Jasmine, pre-2.0 versions have been dropped and tracking will resume at 2.0.0*
+#### options.tempDir
+Type: `String`
+Default: `.grunt/grunt-contrib-jasmine`
+
+The temporary directory that runners use to load jasmine files.
+Automatically deleted upon normal runs.
+
#### options.outfile
Type: `String`
Default: `_SpecRunner.html`
@@ -292,6 +299,27 @@ NPM Templates are just node modules, so you can write and treat them as such.
Please see the [grunt-template-jasmine-requirejs](https://github.com/jsoverson/grunt-template-jasmine-requirejs) documentation
for more information on the RequireJS template.
+#### Keeping temp files in an existing directory
+
+Supplying a custom temp directory
+
+```js
+// Example configuration
+grunt.initConfig({
+ jasmine: {
+ pivotal: {
+ src: 'src/**/*.js',
+ options: {
+ keepRunner: true,
+ tempDir: 'bin/jasmine/',
+ specs: 'spec/*Spec.js',
+ helpers: 'spec/*Helper.js'
+ }
+ }
+ }
+});
+```
+
## Release History
@@ -329,4 +357,4 @@ for more information on the RequireJS template.
Task submitted by [Jarrod Overson](http://jarrodoverson.com)
-*This file was generated on Mon Apr 25 2016 01:03:39.*
+*This file was generated on Tue Jun 14 2016 11:02:35.*
diff --git a/docs/jasmine-examples.md b/docs/jasmine-examples.md
index d34ad34..0e6788c 100644
--- a/docs/jasmine-examples.md
+++ b/docs/jasmine-examples.md
@@ -87,3 +87,24 @@ NPM Templates are just node modules, so you can write and treat them as such.
Please see the [grunt-template-jasmine-requirejs](https://github.com/jsoverson/grunt-template-jasmine-requirejs) documentation
for more information on the RequireJS template.
+
+## Keeping temp files in an existing directory
+
+Supplying a custom temp directory
+
+```js
+// Example configuration
+grunt.initConfig({
+ jasmine: {
+ pivotal: {
+ src: 'src/**/*.js',
+ options: {
+ keepRunner: true,
+ tempDir: 'bin/jasmine/',
+ specs: 'spec/*Spec.js',
+ helpers: 'spec/*Helper.js'
+ }
+ }
+ }
+});
+```
diff --git a/docs/jasmine-options.md b/docs/jasmine-options.md
index 51a7457..d8dd5bd 100644
--- a/docs/jasmine-options.md
+++ b/docs/jasmine-options.md
@@ -37,6 +37,13 @@ This is the jasmine-version which will be used. currently available versions are
*Due to changes in Jasmine, pre-2.0 versions have been dropped and tracking will resume at 2.0.0*
+## options.tempDir
+Type: `String`
+Default: `.grunt/grunt-contrib-jasmine`
+
+The temporary directory that runners use to load jasmine files.
+Automatically deleted upon normal runs.
+
## options.outfile
Type: `String`
Default: `_SpecRunner.html`
diff --git a/tasks/jasmine.js b/tasks/jasmine.js
index 2761591..c1e7c97 100644
--- a/tasks/jasmine.js
+++ b/tasks/jasmine.js
@@ -79,6 +79,7 @@ module.exports = function(grunt) {
vendor: [],
polyfills: [],
customBootFile: null,
+ tempDir: '.grunt/grunt-contrib-jasmine',
outfile: '_SpecRunner.html',
host: '',
template: path.join(__dirname, '/jasmine/templates/DefaultRunner.tmpl'),
@@ -156,7 +157,7 @@ module.exports = function(grunt) {
}
if (!options.keepRunner) {
- jasmine.cleanTemp(cb);
+ jasmine.cleanTemp(options.tempDir, cb);
} else {
cb();
}
diff --git a/tasks/jasmine/templates/DefaultRunner.tmpl b/tasks/jasmine/templates/DefaultRunner.tmpl
index 7fa17a3..0225b65 100644
--- a/tasks/jasmine/templates/DefaultRunner.tmpl
+++ b/tasks/jasmine/templates/DefaultRunner.tmpl
@@ -3,7 +3,7 @@