reveal.js icon indicating copy to clipboard operation
reveal.js copied to clipboard

Instructions to start node server in debug/developper mode

Open tobiasBora opened this issue 3 years ago • 1 comments

I'm trying to develop a plugin for reveal.js, but I have an issue: running npm start first takes a lot of time to recompile the plugins (like 20 seconds the first time, and 6-7 seconds after, for a plugin file which is really small), and secondly it minifies the javascript files: as a result the debug obtained in the console is close to useless since they point to an obfuscated source code.

Is it possible to start reveal.js in debug mode, so that compilation takes less time and code is not minified?

tobiasBora avatar Jan 17 '22 21:01 tobiasBora

I find out that instead of inserting my plugin into gulp, I should rather use the fact that recent Firefox can load ES6 directly without any transpilation. So the following seems to work:

    <script type="module">
      import RevealMyPlugin from './plugin/frameplay/plugin.js';
      Reveal.initialize({
	  hash: true,

	  // Learn about plugins: https://revealjs.com/plugins/
	  plugins: [ RevealMarkdown, RevealHighlight, RevealNotes, RevealMyPlugin ]
      });
    </script>

I just need to refresh manually the browser on a file change. Let me know if you know a better way, in any case I guess it would be cool to document it.

tobiasBora avatar Jan 18 '22 09:01 tobiasBora