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

generator-reveal

v1.0.0

Published

A Reveal.js generator for Yeoman

Downloads

24

Readme

Reveal.js generator Build Status Coverage Status NPM version

Dependency Status devDependency Status

A Yeoman generator for the awesome Reveal.js presentation framework.

Usage

Install: npm install -g generator-reveal

Make a new directory, and cd into it:

mkdir my-new-project && cd $_

Run yo reveal and start building your presentation.

After all files are created you can view your slides with grunt:

grunt serve

Then, create further slides with yo reveal:slide more-content. See below for available options. When you want to export your presentation to some static HTML server, you can type grunt dist to have all your relevant files saved to the dist directory.

Generators

Available generators:

Slide

Generates a Slide file.

Example:

yo reveal:slide "Slide Title"

Produces slides/slide-title.html:

<h2>Slide Title</h2>

<p>This is a new slide</p>

And the slide filename will be added to your slides/list.json file.

[
    "index.md",
    "slide-title.html"
]

Vertical Slides

In order to add vertical slides, you can nest an array inside slides/list.json

[
    "index.md",
    [
        "vertical-html.html",
        "vertical-markdown.md"
    ],
    [
        "vertical-html-2.html",
        "vertical-markdown-2.md"
    ],
    "the-end.md"
]

Simple (Image) Slides

Sometimes you just want a slide with a background image. That's okay, a slide object does not need a filename.

[
    "index.md",
    {
        "attr": {
            "data-background": "http://example.com/image.png"
        }
    }
]

Options

Markdown

Invoked with --markdown

yo reveal:slide "Slide Title" --markdown

Produces slides/slide-title.md

## Slide Title

This is a new slide
Attributes

Invoked with --attributes

yo reveal:slide "Slide Title" --attributes

adds a slide Object with an attr key to your slides/list.json file. Attributes will be passed to section element containing the slide.

[
    "index.md",
    {
        "filename": "slide-title.md",
        "attr": {
            "data-background": "#ff0000"
        }
    }
]
<section data-markdown="slides/slide-title.md" data-background="#ff0000"></section>
Speaker Notes

Invoked with --notes

yo reveal:slide "Slide Title" --notes

Produces slides/slide-title.html:

<h2>Slide Title</h2>

<p>This is a new slide</p>

<aside class="notes">
    Put your speaker notes here.
    You can see them pressing 's'.
</aside>

All three options maybe combined, e.g.

yo reveal:slide "Markdown Slide With Notes And Section-Attributes" --notes --attributes --markdown

Resources

If your presentation requires specific resources that you would like included with your project, place them in the resources directory. These assets will be included in the distribution and available for access at the path resources/asset_name.ext.

Github Pages Deployment

With the help of Grunt Build Control, generator-reveal can deploy your presentation to Github Pages easily. All you have to do is

  • Set your username and repository name when you call yo reveal
  • Create and configure your remote Github repository for the presentation
  • Push your first commit
  • Deploy with grunt deploy

If everything goes right, grunt deploy will build and push your presentation to a gh-pages git branch. Just give it a couple of minutes, fire up a browser and go to http://username.github.io/repositoryname to see your brand new presentation.

Customisation

To change the options of the whole presentation, such as the theme used, transition effect etc. consult the Reveal.js documentation. An important difference, though, is that you should not edit the index.html file directly as it gets overwritten as you add presentation content whenever a new grunt build is triggered. You should instead edit the templates/_index.html file, which is used as a template for the automatically generated index.html.

Highlight.js Syntax Themes

The generated presentation app includes the Highlight.js Syntax Themes as a dependency, allowing you to change the syntax theme.

The available syntax themes can be found in the bower_components/highlightjs/styles folder. Selecting a new syntax theme can be done by changing the stylesheet reference in the templates/_index.html file:

<!-- For syntax highlighting -->
<link rel="stylesheet" href="bower_components/highlightjs/styles/monokai_sublime.css">

License

MIT License