npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

reveal.js-webpack-kit

v2.0.3

Published

webpack-powered reveal.js presentations

Downloads

12

Readme

Reveal.js powered by Webpack 4

Reveal.js webpack-based build system:

  • Webpack as a versatile build system setup. Serve your presentation(s) and enjoy the Hot Module Reloading capabilities or just build your slides for production. Multiple entry points (HTML files) are accepted!
  • Babel to enjoy the most up-to-date javascript syntax
  • Sass because CSS preprocessors are pretty useful and Reveal.js uses that one (enabling us to easily reuse or modify variables)

Come with lots of Reveal.js goodies:

  • Reveal.js-d3 for interactive figures embedding
  • Reveal_external to load external files into your presentation and allow for nested slide loading
  • Reveal.js-menu to have a very handy slideout menu and quickly jump to any slide by title.
  • Font Awesome 5 to fully enjoy the brand new SVG-based framework (built-in option to choose between the CSS or SVG framework)
  • Mathjax for beautiful math in all browsers
  • Modified Reveal.js Math.js file to allow customized fragment events in your Mathjax equations (see below)

Motivation?

I needed a robust system to build several presentations sharing a common library of slides (to develop a class) without the hassle of copy-pasting. I wanted a system that was easily upgradable to the latest versions of the dependencies.

This way, everything stays separated, content (slides), tools (libraries) and configurations files (for the different tools). Just bump the version of any dependencies by doing npm update and rebuild your presentation(s). Done.

How?

Download this repository, go in it and then:

$ # Install dependencies
$ npm install
$ # Do an initial build with the Font Awesome framework of your choice
$ npm run dev-fa-svg
$ # Launch the dev server with hot module replacement
$ npm run live-fa-svg

Look at what the output tells you: There will a server be running (usually on http://localhost:9000) with your presentation. Any changes to the source files will trigger a reload of the presentation (you’ll stay on the current slide of course).

Work in the src folder!

Configuration

Font Awesome Framework

The project has been build to work with the Font Awesome 5. You can choose between:

Note that when the SVG framework is selected, every html files will be scanned and only the icons used will be included in the final bundle (tree-shaking). The svg and css frameworks can be called directly using the npm run-script command (see below).

Dev-server, development-build and production-build

Unminified files will be generated for the developent builds. Minification of the files will be done in all the production build (but building time will be increased, especially if the Font Awesome SVG framework is used). All the build will be generated in the dist folder


$ # Development build, font awesome css framework
$ npm run dev-fa-css

$ # Development build, font awesome svg framework
$ npm run dev-fa-svg

$ # Production build, font awesome css framework
$ npm run build-fa-css

$ # Production build, font awesome svg framework
$ npm run build-fa-svg

$ # Launch the dev-server with hot module replacement with font awesome css framework
$ npm run live-fa-css

$ # Launch the dev-server with hot module replacement with font awesome svg framework
$ npm run live-fa-svg

Note when Hot Module Replacement is used (dev-server):

  • HMR can deal with files already present in the dist (built) folder. So make a build (e.g.: npm run dev-fa-svg) before launching the dev-server to make sure all the files in your src folder have been transfered to the build folder.
  • If FA svg framework is used in development mode, the tree-shaked js file created for each html entry won't be updated, so you'll need to rebuild to see the icons. (this won't happen if the css framework is used since all the icons will be accessible via the webfonts).
  • The same applies if you're using the reveal-external plugin (the dev-server search the file in the dist folder, not the src). You need to make sure the files are also in the build folder, since this is where your app will look for it, so rebuild.

Programming languages supported for code presentation

At the top of the webpack.config.js file are some of the configurations that you can setup, in particular you can select the programming languages supported by highlight.js for code presention (reveal.js <pre><code> tags) in the slides. To minimize the bundle size, you have the possibility to only include the languages that you are using in your presentation(s).

Project structure

Below is an overview of the project structure:

reveal.js-webpack-kit/
├── presentation1.html                          # your different slide decks
├── presentation2.html
├── presentation3.html
├── src/
|   ├── _scripts/
|   |      ├── reveal-config.js                 # configuration for reveal
|   |      └── reveal-dependencies-config.js    # configuration for the plugins
│   ├── _styles/
|   |      └── *.scss                           # all the style files
|   └── content/                                # any content that you refer 
|                                               # in your slides (img, etc ...)
|
├── dist/                   # where your builded slides will be
|
└── webpack.config.js       # some configuration for the build can be tweaked