title: Are there global variables in grunt?
body: <p>While trying to do some kind of generic grunt task i got stuck while accessing variables/options.</p>
  
  <p>I need some kind of global variable or something similar.
  It seems I have overlooked something.</p>
  
  <p>If I run <code>grunt sassCompile:myprojectFolder</code>, everything works fine 
  while <code>grunt sassWatch:myprojectFolder</code> does not.</p>
  
  <p>I run it in verbose mode and it seems <strong>projectPath</strong> is empty while compass is being called by watch.</p>
  
  <p>compass options (from verbose output):</p>
  
  <p><strong>sassCompile</strong>: <code>config="projectRoot/myprojectFolder/config.rb" ...</code></p>
  
  <p><strong>sassWatch</strong>: <code>config="config.rb" ...</code></p>
  
  <p>This is the Gruntfile.js is used for testing:</p>
  
  <p>What I am doing wrong?</p>
  
  <pre><code>(function() {
      'use strict';
      module.exports = function (grunt) {
          grunt.initConfig({
              compass: {
                  dev: {
                      options: {
                          config: "&lt;%= projectPath %&gt;config.rb",
                          basePath: "&lt;%= projectPath %&gt;",
                          specify: ["&lt;%= projectPath %&gt;src/sass/style*.scss","!**/*ie*.scss"],
                          bundleExec: true
                      }
                  }
              },
              watch: {
                  css: {
                      files: ['&lt;%= projectPath %&gt;../**/*.scss'],
                      tasks: ['compass']
                  }
              }
          });
          grunt.registerTask('sassCompile', 'compass', function (project) {
              grunt.config('projectPath', 'projectRoot/' + project + '/');
              grunt.task.run('compass');
          });
          grunt.registerTask('sassWatch', 'watch', function (project) {
              grunt.config('projectPath', 'projectRoot/' + project + '/');
              grunt.task.run('watch');
          });
  
          grunt.loadNpmTasks('grunt-contrib-watch');
          grunt.loadNpmTasks('grunt-contrib-compass');
      };
  }());
  </code></pre>