title: How to include a static JSON file for compilation with Jade and Grunt
body: <p>how do I compile Jade templates to static HTML via Grunt where my data is already
  held in a JSON file?</p>
  
  <p>Say I have this Gruntfile.js</p>
  
  <pre><code>module.exports = function(grunt) {
  
      grunt.loadNpmTasks('grunt-contrib-jade');
  
      grunt.initConfig(
      {
          jade: {
              html: {
                  src: './*.jade',
                  dest: './index2.html',
                  options: {
                      client: false,
                      pretty: true
                  }
              }
          }
      });
  
      grunt.registerTask('default', 'jade');
  };
  </code></pre>
  
  <p>This JSON file (./data.json)</p>
  
  <pre><code>{
      "foo": {value: 1},
      "bar": {value: 2},
      "baz": {value: 3}
  }
  </code></pre>
  
  <p>And this Jade (./index.jade)</p>
  
  <pre><code>ul
      li data_loaded_from_json.foo.value
      li data_loaded_from_json.bar.value
      li data_loaded_from_json.baz.value
  </code></pre>
  
  <p>So how can I teach grunt to load the json file and make it available to Jade
  as a global variable?</p>
  
  <p>Thanks for your help</p>