title: How to fix the Javascript "anonymous function"
body: <p>I want to design some slides by Javascript, and use the Reveal library and follow the template 
  <a href="https://github.com/hakimel/reveal.js/blob/master/index.html" rel="nofollow">https://github.com/hakimel/reveal.js/blob/master/index.html</a></p>
  
  <p>and plan to embed a charts into the slides by echarts library and follow this demo
  <a href="http://ecomfe.github.io/echarts/doc/start-en.html" rel="nofollow">http://ecomfe.github.io/echarts/doc/start-en.html</a></p>
  
  <p>I put these two library as follow directory without any change of echarts/reveal library.</p>
  
  <pre><code>|--echarts-2.2.0
  |--reveal.js
  \--mySlides.html
  </code></pre>
  
  <p>When I merged these two demo together, I got the "anonymous function" of "require.config". No idea how to debug it. Anyone can help it? Thanks.</p>
  
  <p>Uncaught ReferenceError: Reveal is not defined
    (anonymous function)  mySlides.html:36</p>
  
  <p>mySlides.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
  
      &lt;title&gt;reveal.js - The HTML Presentation Framework&lt;/title&gt;
  
      &lt;meta name="description" content="A framework for easily creating beautiful presentations using HTML"&gt;
      &lt;meta name="author" content="Hakim El Hattab"&gt;
  
      &lt;meta name="apple-mobile-web-app-capable" content="yes" /&gt;
      &lt;meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /&gt;
  
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui"&gt;
  
      &lt;link rel="stylesheet" href="reveal.js/css/reveal.css"&gt;
      &lt;link rel="stylesheet" href="reveal.js/css/theme/black.css" id="theme"&gt;
  
      &lt;!-- Code syntax highlighting --&gt;
      &lt;link rel="stylesheet" href="reveal.js/lib/css/zenburn.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div class="reveal"&gt;
  
      &lt;!-- Any section element inside of this container is displayed as a slide --&gt;
      &lt;div class="slides"&gt;
  
              &lt;section id="page1" data-background="#ff0000"&gt;
                      &lt;div id="main" style="height:400px"&gt;&lt;/div&gt;
                      &lt;!-- ECharts单文件引入 --&gt;
                      &lt;script src="echarts-2.2.0/build/dist/echarts.js"&gt;&lt;/script&gt;
                      &lt;script type="text/javascript"&gt;
                          require.config({
                              paths: {
                                  echarts: 'echarts-2.2.0/build/dist'
                              }
                          });
  
                          // 使用
                          require(
                                  [
                                      'echarts',
                                      'echarts/chart/bar'
                                  ],
                                  function (ec) {
                                      var myChart = ec.init(document.getElementById('main'));
  
                                      var option = {
                                          tooltip: {
                                              show: true
                                          },
                                          legend: {
                                              data:['销量']
                                          },
                                          xAxis : [
                                              {
                                                  type : 'category',
                                                  data : ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
                                              }
                                          ],
                                          yAxis : [
                                              {
                                                  type : 'value'
                                              }
                                          ],
                                          series : [
                                              {
                                                  "name":"销量",
                                                  "type":"bar",
                                                  "data":[5, 20, 40, 10, 10, 20]
                                              }
                                          ]
                                      };
                                      myChart.setOption(option);
                                  }
                          );
                      &lt;/script&gt;
              &lt;/section&gt;
              &lt;section id="page2"&gt;&lt;p&gt;Page2&lt;/p&gt;&lt;/section&gt;
      &lt;/div&gt;
  
  &lt;/div&gt;
  
  &lt;script src="reveal.js/lib/js/head.min.js"&gt;&lt;/script&gt;
  &lt;script src="reveal.js/js/reveal.js"&gt;&lt;/script&gt;
  
  &lt;script&gt;
  
      // Full list of configuration options available at:
      // https://github.com/hakimel/reveal.js#configuration
      Reveal.initialize({
          controls: true,
          progress: true,
          history: true,
          center: true,
  
          transition: 'slide', // none/fade/slide/convex/concave/zoom
  
          // Optional reveal.js plugins
          dependencies: [
              { src: 'reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
              { src: 'reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
              { src: 'reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
              { src: 'reveal.js/plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
              { src: 'reveal.js/plugin/zoom-js/zoom.js', async: true },
              { src: 'reveal.js/plugin/notes/notes.js', async: true }
          ]
      });
  
  &lt;/script&gt;
  
  &lt;/body&gt;
  </code></pre>